BetterSlider.range constructor

const BetterSlider.range({
  1. Key? key,
  2. required RangeValues? values,
  3. required ValueChanged<RangeValues> onChanged,
  4. ValueChanged<RangeValues>? onRangeChangeStart,
  5. ValueChanged<RangeValues>? onRangeChangeEnd,
  6. double min = 0,
  7. double max = 100,
  8. double step = 1,
  9. Color? activeColor,
  10. Color? inactiveColor,
  11. double? barHeight,
  12. double? buttonSize,
  13. Widget? startButton,
  14. Widget? endButton,
  15. bool disabled = false,
  16. bool readOnly = false,
  17. bool reverse = false,
  18. bool vertical = false,
  19. double? height,
  20. Duration tapAnimationDuration = const Duration(milliseconds: 200),
})

Implementation

const BetterSlider.range({
  super.key,
  required this.values,
  required ValueChanged<RangeValues> onChanged,
  this.onRangeChangeStart,
  this.onRangeChangeEnd,
  this.min = 0,
  this.max = 100,
  this.step = 1,
  this.activeColor,
  this.inactiveColor,
  this.barHeight,
  this.buttonSize,
  this.startButton,
  this.endButton,
  this.disabled = false,
  this.readOnly = false,
  this.reverse = false,
  this.vertical = false,
  this.height,
  this.tapAnimationDuration = const Duration(milliseconds: 200),
}) : value = null,
     controller = null,
     onChanged = null,
     onChangeStart = null,
     onChangeEnd = null,
     onRangeChanged = onChanged,
     button = null,
     assert(max > min, 'max must be greater than min'),
     assert(step > 0, 'step must be greater than zero');