Animate slider radial reaction

Also, have the slider draw different in its disabled state.
This commit is contained in:
Adam Barth
2015-11-25 15:01:36 -08:00
parent 13fbafdabf
commit 4fa24f5695
2 changed files with 35 additions and 9 deletions

View File

@@ -14,6 +14,10 @@ class _SliderDemoState extends State<SliderDemo> {
double _value = 0.25;
Widget build(BuildContext context) {
Widget label = new Container(
padding: const EdgeDims.symmetric(horizontal: 16.0),
child: new Text(_value.toStringAsFixed(2))
);
return new Block([
new Container(
height: 100.0,
@@ -27,13 +31,21 @@ class _SliderDemoState extends State<SliderDemo> {
});
}
),
new Container(
padding: const EdgeDims.symmetric(horizontal: 16.0),
child: new Text(_value.toStringAsFixed(2))
),
label,
], justifyContent: FlexJustifyContent.collapse)
)
),
new Container(
height: 100.0,
child: new Center(
child: new Row([
// Disabled, but tracking the slider above.
new Slider(value: _value),
label,
], justifyContent: FlexJustifyContent.collapse)
)
)
]);
}
}