ExpandableSlider constructor

const ExpandableSlider({
  1. required double value,
  2. required void onChanged(
    1. double
    ),
  3. void onChangeStart(
    1. double
    )?,
  4. void onChangeEnd(
    1. double
    )?,
  5. void onExpansionStart()?,
  6. void onShrinkageStart()?,
  7. double estimatedValueStep = 1,
  8. double? shrunkWidth,
  9. Color? inactiveColor,
  10. Color? activeColor,
  11. double min = 0,
  12. double max = 1,
  13. Duration expansionDuration = durations.mediumPresenting,
  14. Duration shrinkageDuration = durations.mediumDismissing,
  15. Duration snapCenterScrollDuration = durations.longPresenting,
  16. Duration sideScrollDuration = durations.shortPresenting,
  17. Curve expansionCurve = curves.exiting,
  18. Curve shrinkageCurve = curves.entering,
  19. Curve snapCenterScrollCurve = curves.base,
  20. Curve sideScrollCurve = curves.base,
  21. bool expandsOnLongPress = true,
  22. bool expandsOnScale = true,
  23. bool expandsOnDoubleTap = false,
  24. ScrollBehavior scrollBehavior = const ScrollBehavior(),
  25. ExpandableSliderController? controller,
  26. Key? key,
})

Creates a Material Design slider that can be expanded to select values with more precision.

See also:

  • Slider, which is a widget used to select from a range of values.

Implementation

const ExpandableSlider({
  required this.value,
  required this.onChanged,
  this.onChangeStart,
  this.onChangeEnd,
  this.onExpansionStart,
  this.onShrinkageStart,
  this.estimatedValueStep = 1,
  this.shrunkWidth,
  this.inactiveColor,
  this.activeColor,
  this.min = 0,
  this.max = 1,
  this.expansionDuration = durations.mediumPresenting,
  this.shrinkageDuration = durations.mediumDismissing,
  this.snapCenterScrollDuration = durations.longPresenting,
  this.sideScrollDuration = durations.shortPresenting,
  this.expansionCurve = curves.exiting,
  this.shrinkageCurve = curves.entering,
  this.snapCenterScrollCurve = curves.base,
  this.sideScrollCurve = curves.base,
  this.expandsOnLongPress = true,
  this.expandsOnScale = true,
  this.expandsOnDoubleTap = false,
  this.scrollBehavior = const ScrollBehavior(),
  this.controller,
  Key? key,
})  : _sliderType = _SliderType.material,
      super(key: key);