MultiSlider constructor
const
MultiSlider({
- required List<
double> values, - required ValueChanged<
List< ? onChanged,double> > - double max = 1,
- double min = 0,
- ValueChanged<
List< ? onChangeStart,double> > - ValueChanged<
List< ? onChangeEnd,double> > - Color? color,
- List<
Color> ? rangeColors, - Color? thumbColor,
- Color? thumbInactiveColor = Colors.grey,
- double thumbRadius = 10,
- double horizontalPadding = 26.0,
- double height = 45,
- double activeTrackSize = 6,
- double inactiveTrackSize = 4,
- IndicatorBuilder? indicator,
- IndicatorBuilder? selectedIndicator = defaultIndicator,
- int? divisions,
- ThumbBuilder thumbBuilder = defaultThumbBuilder,
- TrackbarBuilder trackbarBuilder = defaultTrackbarBuilder,
- TextDirection textDirection = TextDirection.ltr,
- double textHeightOffset = 30,
- 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);