Unverified Commit 3f30b613 authored by Jose Alba's avatar Jose Alba Committed by GitHub

Migrating old Gallery to new Slider (#55201)

parent 78bf9ba4
......@@ -305,6 +305,7 @@ class _ExpansionPanelsDemoState extends State<ExpansionPanelsDemo> {
// Allow room for the value indicator.
padding: const EdgeInsets.only(top: 44.0),
child: Slider(
useV2Slider: true,
min: 0.0,
max: 100.0,
divisions: 5,
......
......@@ -274,6 +274,7 @@ class _SlidersState extends State<_Sliders> {
),
),
Slider.adaptive(
useV2Slider: true,
label: _continuousValue.toStringAsFixed(6).toString(),
value: _continuousValue,
min: 0.0,
......@@ -290,7 +291,7 @@ class _SlidersState extends State<_Sliders> {
Column(
mainAxisSize: MainAxisSize.min,
children: const <Widget>[
Slider.adaptive(value: 0.25, onChanged: null),
Slider.adaptive(useV2Slider: true, value: 0.25, onChanged: null),
Text('Disabled'),
],
),
......@@ -298,6 +299,7 @@ class _SlidersState extends State<_Sliders> {
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Slider.adaptive(
useV2Slider: true,
value: _discreteValue,
min: 0.0,
max: 200.0,
......@@ -329,6 +331,7 @@ class _SlidersState extends State<_Sliders> {
valueIndicatorTextStyle: theme.accentTextTheme.bodyText1.copyWith(color: theme.colorScheme.onSurface),
),
child: Slider(
useV2Slider: true,
value: _discreteCustomValue,
min: 0.0,
max: 200.0,
......@@ -372,6 +375,7 @@ class _RangeSlidersState extends State<_RangeSliders> {
mainAxisSize: MainAxisSize.min,
children: <Widget>[
RangeSlider(
useV2Slider: true,
values: _continuousValues,
min: 0.0,
max: 100.0,
......@@ -387,7 +391,7 @@ class _RangeSlidersState extends State<_RangeSliders> {
Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
RangeSlider(values: const RangeValues(0.25, 0.75), onChanged: null),
RangeSlider(useV2Slider: true, values: const RangeValues(0.25, 0.75), onChanged: null),
const Text('Disabled'),
],
),
......@@ -395,6 +399,7 @@ class _RangeSlidersState extends State<_RangeSliders> {
mainAxisSize: MainAxisSize.min,
children: <Widget>[
RangeSlider(
useV2Slider: true,
values: _discreteValues,
min: 0.0,
max: 200.0,
......@@ -424,6 +429,7 @@ class _RangeSlidersState extends State<_RangeSliders> {
showValueIndicator: ShowValueIndicator.never,
),
child: RangeSlider(
useV2Slider: true,
values: _discreteCustomValues,
min: 0.0,
max: 200.0,
......
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