Slider constructor

Slider({
  1. required double value,
  2. ValueCmdCallback<double>? onChanged,
  3. double min = 0.0,
  4. double max = 1.0,
  5. int? divisions,
  6. int width = 24,
  7. bool enabled = true,
  8. Color? activeColor,
  9. Color? inactiveColor,
  10. Color? thumbColor,
  11. String activeTrackChar = '=',
  12. String inactiveTrackChar = '-',
  13. String thumbChar = 'o',
  14. String? label,
  15. bool autofocus = false,
  16. String? focusId,
  17. FocusController? focusController,
  18. Key? key,
})

Implementation

Slider({
  required this.value,
  this.onChanged,
  this.min = 0.0,
  this.max = 1.0,
  this.divisions,
  this.width = 24,
  this.enabled = true,
  this.activeColor,
  this.inactiveColor,
  this.thumbColor,
  this.activeTrackChar = '=',
  this.inactiveTrackChar = '-',
  this.thumbChar = 'o',
  this.label,
  this.autofocus = false,
  this.focusId,
  this.focusController,
  super.key,
}) : assert(max >= min),
     assert(divisions == null || divisions > 0),
     assert(width > 0),
     assert(activeTrackChar.length == 1),
     assert(inactiveTrackChar.length == 1),
     assert(thumbChar.length == 1);