BetterSlider constructor

const BetterSlider({
  1. Key? key,
  2. double? value = 0,
  3. BetterSliderController? controller,
  4. required ValueChanged<double>? onChanged,
  5. ValueChanged<double>? onChangeStart,
  6. ValueChanged<double>? onChangeEnd,
  7. double min = 0,
  8. double max = 100,
  9. double step = 1,
  10. Color? activeColor,
  11. Color? inactiveColor,
  12. double? barHeight,
  13. double? buttonSize,
  14. Widget? button,
  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({
  super.key,
  this.value = 0,
  this.controller,
  required this.onChanged,
  this.onChangeStart,
  this.onChangeEnd,
  this.min = 0,
  this.max = 100,
  this.step = 1,
  this.activeColor,
  this.inactiveColor,
  this.barHeight,
  this.buttonSize,
  this.button,
  this.disabled = false,
  this.readOnly = false,
  this.reverse = false,
  this.vertical = false,
  this.height,
  this.tapAnimationDuration = const Duration(milliseconds: 200),
}) : values = null,
     onRangeChanged = null,
     onRangeChangeStart = null,
     onRangeChangeEnd = null,
     startButton = null,
     endButton = null,
     assert(max > min, 'max must be greater than min'),
     assert(step > 0, 'step must be greater than zero');