Commit e0f6c0db authored by Adam Barth's avatar Adam Barth Committed by GitHub

Add labels to the slider demos (#5639)

Previously, it was unclear that the middle slider was disabled.

Fixes #5517
parent ea6bf470
...@@ -22,8 +22,10 @@ class _SliderDemoState extends State<SliderDemo> { ...@@ -22,8 +22,10 @@ class _SliderDemoState extends State<SliderDemo> {
body: new Column( body: new Column(
mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[ children: <Widget>[
new Center( new Column(
child: new Slider( mainAxisSize: MainAxisSize.min,
children: <Widget> [
new Slider(
value: _value, value: _value,
min: 0.0, min: 0.0,
max: 100.0, max: 100.0,
...@@ -32,11 +34,21 @@ class _SliderDemoState extends State<SliderDemo> { ...@@ -32,11 +34,21 @@ class _SliderDemoState extends State<SliderDemo> {
_value = value; _value = value;
}); });
} }
)
), ),
new Center(child: new Slider(value: 0.25, onChanged: null)), new Text('Continuous'),
new Center( ]
child: new Slider( ),
new Column(
mainAxisSize: MainAxisSize.min,
children: <Widget> [
new Slider(value: 0.25, onChanged: null),
new Text('Disabled'),
]
),
new Column(
mainAxisSize: MainAxisSize.min,
children: <Widget> [
new Slider(
value: _discreteValue, value: _discreteValue,
min: 0.0, min: 0.0,
max: 100.0, max: 100.0,
...@@ -47,7 +59,9 @@ class _SliderDemoState extends State<SliderDemo> { ...@@ -47,7 +59,9 @@ class _SliderDemoState extends State<SliderDemo> {
_discreteValue = value; _discreteValue = value;
}); });
} }
) ),
new Text('Discrete'),
]
), ),
] ]
) )
......
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