Commit 57d5de84 authored by Hans Muller's avatar Hans Muller Committed by GitHub

Fix label text wrapping in expansion panels gallery demo (#7103)

parent 28bfbd6c
......@@ -49,8 +49,15 @@ class DualHeaderWithHint extends StatelessWidget {
flex: 2,
child: new Container(
margin: const EdgeInsets.only(left: 24.0),
child: new Text(name, style: textTheme.body1.copyWith(fontSize: 15.0))
)
child: new FittedBox(
fit: ImageFit.scaleDown,
alignment: FractionalOffset.centerLeft,
child: new Text(
name,
style: textTheme.body1.copyWith(fontSize: 15.0),
),
),
),
),
new Expanded(
flex: 3,
......@@ -178,7 +185,7 @@ class _ExpansionPanelsDemoState extends State<ExpasionPanelsDemo> {
_demoItems = <DemoItem<dynamic>>[
new DemoItem<String>(
name: 'Trip name',
name: 'Trip',
value: 'Caribbean cruise',
hint: 'Change trip name',
valueToString: (String value) => value,
......@@ -282,9 +289,9 @@ class _ExpansionPanelsDemoState extends State<ExpasionPanelsDemo> {
}
),
new DemoItem<double>(
name: 'Sun amount',
name: 'Sun',
value: 80.0,
hint: 'Select amount of sun',
hint: 'Select sun level',
valueToString: (double amount) => '${amount.round()}',
builder: (DemoItem<double> item) { // ignore: argument_type_not_assignable, https://github.com/flutter/flutter/issues/5771
void close() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment