Unverified Commit 8418daae authored by Anthony's avatar Anthony Committed by GitHub

Wrap expansion panel slider in padded container (#35129)

Fix the Expansion Panel flutter_gallery demo by wrapping the Slider in a padded Container so that the value indicator does not get clipped.
parent 90284305
...@@ -301,14 +301,18 @@ class _ExpansionPanelsDemoState extends State<ExpansionPanelsDemo> { ...@@ -301,14 +301,18 @@ class _ExpansionPanelsDemoState extends State<ExpansionPanelsDemo> {
initialValue: item.value, initialValue: item.value,
onSaved: (double value) { item.value = value; }, onSaved: (double value) { item.value = value; },
builder: (FormFieldState<double> field) { builder: (FormFieldState<double> field) {
return Slider( return Container(
min: 0.0, // Allow room for the value indicator.
max: 100.0, padding: const EdgeInsets.only(top: 44.0),
divisions: 5, child: Slider(
activeColor: Colors.orange[100 + (field.value * 5.0).round()], min: 0.0,
label: '${field.value.round()}', max: 100.0,
value: field.value, divisions: 5,
onChanged: field.didChange, activeColor: Colors.orange[100 + (field.value * 5.0).round()],
label: '${field.value.round()}',
value: field.value,
onChanged: field.didChange,
),
); );
}, },
), ),
......
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