Slider shouldn't be open at min (#7342)
This patch changes the default appearance of Slider to not have the thumb be an open circle at its minimum position. The `thumbOpenAtMin` property can enable drawing an open thumb at the min position, which was the previous behavior. Fixes #6941
This commit is contained in:
@@ -30,6 +30,7 @@ class _SliderDemoState extends State<SliderDemo> {
|
||||
value: _value,
|
||||
min: 0.0,
|
||||
max: 100.0,
|
||||
thumbOpenAtMin: true,
|
||||
onChanged: (double value) {
|
||||
setState(() {
|
||||
_value = value;
|
||||
@@ -42,7 +43,7 @@ class _SliderDemoState extends State<SliderDemo> {
|
||||
new Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: <Widget> [
|
||||
new Slider(value: 0.25, onChanged: null),
|
||||
new Slider(value: 0.25, thumbOpenAtMin: true, onChanged: null),
|
||||
new Text('Disabled'),
|
||||
]
|
||||
),
|
||||
@@ -55,6 +56,7 @@ class _SliderDemoState extends State<SliderDemo> {
|
||||
max: 100.0,
|
||||
divisions: 5,
|
||||
label: '${_discreteValue.round()}',
|
||||
thumbOpenAtMin: true,
|
||||
onChanged: (double value) {
|
||||
setState(() {
|
||||
_discreteValue = value;
|
||||
|
||||
Reference in New Issue
Block a user