ExpandableSlider constructor
const
ExpandableSlider({
- required double value,
- required void onChanged(),
- void onChangeStart()?,
- void onChangeEnd()?,
- void onExpansionStart()?,
- void onShrinkageStart()?,
- double estimatedValueStep = 1,
- double? shrunkWidth,
- Color? inactiveColor,
- Color? activeColor,
- double min = 0,
- double max = 1,
- Duration expansionDuration = durations.mediumPresenting,
- Duration shrinkageDuration = durations.mediumDismissing,
- Duration snapCenterScrollDuration = durations.longPresenting,
- Duration sideScrollDuration = durations.shortPresenting,
- Curve expansionCurve = curves.exiting,
- Curve shrinkageCurve = curves.entering,
- Curve snapCenterScrollCurve = curves.base,
- Curve sideScrollCurve = curves.base,
- bool expandsOnLongPress = true,
- bool expandsOnScale = true,
- bool expandsOnDoubleTap = false,
- ScrollBehavior scrollBehavior = const ScrollBehavior(),
- ExpandableSliderController? controller,
- 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);