BetterSlider constructor
const
BetterSlider({
- Key? key,
- double? value = 0,
- BetterSliderController? controller,
- required ValueChanged<
double> ? onChanged, - ValueChanged<
double> ? onChangeStart, - ValueChanged<
double> ? onChangeEnd, - double min = 0,
- double max = 100,
- double step = 1,
- Color? activeColor,
- Color? inactiveColor,
- double? barHeight,
- double? buttonSize,
- Widget? button,
- bool disabled = false,
- bool readOnly = false,
- bool reverse = false,
- bool vertical = false,
- double? height,
- 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');