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> {
initialValue: item.value,
onSaved: (double value) { item.value = value; },
builder: (FormFieldState<double> field) {
return Slider(
min: 0.0,
max: 100.0,
divisions: 5,
activeColor: Colors.orange[100 + (field.value * 5.0).round()],
label: '${field.value.round()}',
value: field.value,
onChanged: field.didChange,
return Container(
// Allow room for the value indicator.
padding: const EdgeInsets.only(top: 44.0),
child: Slider(
min: 0.0,
max: 100.0,
divisions: 5,
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