'How to have a slider in flutter with specific divisions
I want to have a slider in flutter with numbers like .5,1,2,3,4,5,10,15. How is this possible. I know that the divisions creates divisions in the slider that are linear. Is this possible to have my own numbers as each dot instead of a linear slider?
Slider(
value: seconds,
max: 3600,
divisions:
120, // this is where i want to have a not a linear division
label: (seconds / 60.0).toStringAsFixed(1),
onChanged: (double value) {
setState(() {
seconds = value;
});
},
),
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
