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:
Adam Barth
2017-01-05 11:29:55 -08:00
committed by GitHub
parent c613a85c0f
commit 0c6dc598f7
6 changed files with 126 additions and 49 deletions

View File

@@ -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;