Slider constructor

const Slider({
  1. Key? key,
  2. required double value,
  3. required ValueChanged<double>? onChanged,
  4. ValueChanged<double>? onChangeStart,
  5. ValueChanged<double>? onChangeEnd,
  6. double min = 0.0,
  7. double max = 100.0,
  8. int? divisions,
  9. SliderThemeData? style,
  10. String? label,
  11. FocusNode? focusNode,
  12. bool vertical = false,
  13. bool autofocus = false,
  14. MouseCursor mouseCursor = MouseCursor.defer,
})

Creates a fluent-styled slider.

Implementation

const Slider({
  super.key,
  required this.value,
  required this.onChanged,
  this.onChangeStart,
  this.onChangeEnd,
  this.min = 0.0,
  this.max = 100.0,
  this.divisions,
  this.style,
  this.label,
  this.focusNode,
  this.vertical = false,
  this.autofocus = false,
  this.mouseCursor = MouseCursor.defer,
})  : assert(value >= min && value <= max),
      assert(divisions == null || divisions > 0);