MiuixRangeSliderPreference constructor
const
MiuixRangeSliderPreference({
- Key? key,
- required double startValue,
- required double endValue,
- required ValueChanged<
(double, double)> onValueChange, - String? title,
- MiuixBasicComponentColors? titleColor,
- String? summary,
- MiuixBasicComponentColors? summaryColor,
- Widget? startAction,
- String? valueText,
- List<
Widget> ? endActions, - Widget? bottomAction,
- VoidCallback? onClick,
- bool holdDownState = false,
- bool enabled = true,
- double min = 0.0,
- double max = 1.0,
- int steps = 0,
- VoidCallback? onValueChangeFinished,
- double sliderHeight = MiuixSliderDefaults.minHeight,
- MiuixSliderColors? sliderColors,
- MiuixSliderHapticEffect hapticEffect = MiuixSliderDefaults.defaultHapticEffect,
- bool showKeyPoints = false,
- List<
double> ? keyPoints, - double magnetThreshold = 0.02,
- EdgeInsetsGeometry insideMargin = MiuixBasicComponentDefaults.insideMargin,
Implementation
const MiuixRangeSliderPreference({
super.key,
required this.startValue,
required this.endValue,
required this.onValueChange,
this.title,
this.titleColor,
this.summary,
this.summaryColor,
this.startAction,
this.valueText,
this.endActions,
this.bottomAction,
this.onClick,
this.holdDownState = false,
this.enabled = true,
this.min = 0.0,
this.max = 1.0,
this.steps = 0,
this.onValueChangeFinished,
this.sliderHeight = MiuixSliderDefaults.minHeight,
this.sliderColors,
this.hapticEffect = MiuixSliderDefaults.defaultHapticEffect,
this.showKeyPoints = false,
this.keyPoints,
this.magnetThreshold = 0.02,
this.insideMargin = MiuixBasicComponentDefaults.insideMargin,
}) : assert(steps >= 0, 'steps should be >= 0'),
assert(min < max, 'min should be less than max');