BetterSlider.range constructor
const
BetterSlider.range({
- Key? key,
- required RangeValues? values,
- required ValueChanged<
RangeValues> onChanged, - ValueChanged<
RangeValues> ? onRangeChangeStart, - ValueChanged<
RangeValues> ? onRangeChangeEnd, - double min = 0,
- double max = 100,
- double step = 1,
- Color? activeColor,
- Color? inactiveColor,
- double? barHeight,
- double? buttonSize,
- Widget? startButton,
- Widget? endButton,
- bool disabled = false,
- bool readOnly = false,
- bool reverse = false,
- bool vertical = false,
- double? height,
- 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');