MultiSlider constructor

const MultiSlider({
  1. required List<double> values,
  2. required ValueChanged<List<double>>? onChanged,
  3. double max = 1,
  4. double min = 0,
  5. ValueChanged<List<double>>? onChangeStart,
  6. ValueChanged<List<double>>? onChangeEnd,
  7. Color? color,
  8. List<Color>? rangeColors,
  9. Color? thumbColor,
  10. Color? thumbInactiveColor = Colors.grey,
  11. double thumbRadius = 10,
  12. double horizontalPadding = 26.0,
  13. double height = 45,
  14. double activeTrackSize = 6,
  15. double inactiveTrackSize = 4,
  16. IndicatorBuilder? indicator,
  17. IndicatorBuilder? selectedIndicator = defaultIndicator,
  18. int? divisions,
  19. ThumbBuilder thumbBuilder = defaultThumbBuilder,
  20. TrackbarBuilder trackbarBuilder = defaultTrackbarBuilder,
  21. TextDirection textDirection = TextDirection.ltr,
  22. double textHeightOffset = 30,
  23. Key? key,
})

Implementation

const MultiSlider({
  required this.values,
  required this.onChanged,
  this.max = 1,
  this.min = 0,
  this.onChangeStart,
  this.onChangeEnd,
  this.color,
  this.rangeColors,
  this.thumbColor,
  this.thumbInactiveColor = Colors.grey,
  this.thumbRadius = 10,
  this.horizontalPadding = 26.0,
  this.height = 45,
  this.activeTrackSize = 6,
  this.inactiveTrackSize = 4,
  this.indicator,
  this.selectedIndicator = defaultIndicator,
  this.divisions,
  this.thumbBuilder = defaultThumbBuilder,
  this.trackbarBuilder = defaultTrackbarBuilder,
  this.textDirection = TextDirection.ltr,
  this.textHeightOffset = 30,
  Key? key,
})  : range = max - min,
      assert(values.length != 0),
      assert(divisions == null || divisions > 0),
      assert(max - min >= 0),
      super(key: key);