Slider(
min: 0,
max: 35,
divisions: 15,
value: _sliderValue.toDouble(),
onChanged: _change1Slider)
void _change1Slider(double e) => setState(() {
_sliderValue = e;
print((_sliderValue * base_number).floor() / base_number);
});
I'm using Flutter's Slider and want to invert min and max.
I want 35 to be the value shown on the left and I want 0 to be the value shown on the right.
To show your maximum value on the left and your minimum value on the right, change the text direction of the
Slidertoright to left.Do this by:
Sliderwidget in the Directionality widget andtextDirectionproperty as TextDirection.rtl.Here's a screenshot below: