ArnaSlider constructor
const
ArnaSlider({
- Key? key,
- required double value,
- required ValueChanged<
double> ? onChanged, - ValueChanged<
double> ? onChangeStart, - ValueChanged<
double> ? onChangeEnd, - double min = 0.0,
- double max = 1.0,
- int? divisions,
- bool isFocusable = true,
- bool autofocus = false,
- Color? accentColor,
- MouseCursor cursor = MouseCursor.defer,
Creates an Arna-styled slider.
The slider itself does not maintain any state. Instead, when the state of the slider changes, the widget calls the onChanged callback. Most widgets that use a slider will listen for the onChanged callback and rebuild the slider with a new value to update the visual appearance of the slider.
- value determines currently selected value for this slider.
- onChanged is called when the user selects a new value for the slider.
- onChangeStart is called when the user starts to select a new value for the slider.
- onChangeEnd is called when the user is done selecting a new value for the slider.
Implementation
const ArnaSlider({
super.key,
required this.value,
required this.onChanged,
this.onChangeStart,
this.onChangeEnd,
this.min = 0.0,
this.max = 1.0,
this.divisions,
this.isFocusable = true,
this.autofocus = false,
this.accentColor,
this.cursor = MouseCursor.defer,
}) : assert(value >= min && value <= max);