MiuixRangeSliderPreference constructor

const MiuixRangeSliderPreference({
  1. Key? key,
  2. required double startValue,
  3. required double endValue,
  4. required ValueChanged<(double, double)> onValueChange,
  5. String? title,
  6. MiuixBasicComponentColors? titleColor,
  7. String? summary,
  8. MiuixBasicComponentColors? summaryColor,
  9. Widget? startAction,
  10. String? valueText,
  11. List<Widget>? endActions,
  12. Widget? bottomAction,
  13. VoidCallback? onClick,
  14. bool holdDownState = false,
  15. bool enabled = true,
  16. double min = 0.0,
  17. double max = 1.0,
  18. int steps = 0,
  19. VoidCallback? onValueChangeFinished,
  20. double sliderHeight = MiuixSliderDefaults.minHeight,
  21. MiuixSliderColors? sliderColors,
  22. MiuixSliderHapticEffect hapticEffect = MiuixSliderDefaults.defaultHapticEffect,
  23. bool showKeyPoints = false,
  24. List<double>? keyPoints,
  25. double magnetThreshold = 0.02,
  26. 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');