FSlider constructor
FSlider({
- FSliderControl control = const .managedContinuous(),
- FSliderStyle style(
- FSliderStyle style
- FLayout? layout,
- Widget? label,
- Widget? description,
- Widget errorBuilder(
- BuildContext context,
- String message
- List<
FSliderMark> marks = const [], - double? trackMainAxisExtent,
- double? trackHitRegionCrossExtent,
- FSliderTooltipControls tooltipControls = const .new(),
- Widget tooltipBuilder(
- FTooltipController controller,
- double value
- String semanticValueFormatterCallback() = _semanticValueFormatter,
- String semanticFormatterCallback()?,
- ValueChanged<
FSliderValue> ? onEnd, - FormFieldSetter<
FSliderValue> ? onSaved, - VoidCallback? onReset,
- FormFieldValidator<
FSliderValue> ? validator, - String? forceErrorText,
- bool enabled = true,
- AutovalidateMode autovalidateMode = .disabled,
- Key? key,
Creates a FSlider.
Implementation
FSlider({
this.control = const .managedContinuous(),
this.style,
this.layout,
this.label,
this.description,
this.errorBuilder = FFormFieldProperties.defaultErrorBuilder,
this.marks = const [],
this.trackMainAxisExtent,
this.trackHitRegionCrossExtent,
this.tooltipControls = const .new(),
this.tooltipBuilder = _tooltipBuilder,
this.semanticValueFormatterCallback = _semanticValueFormatter,
this.semanticFormatterCallback,
this.onEnd,
this.onSaved,
this.onReset,
this.validator,
this.forceErrorText,
this.enabled = true,
this.autovalidateMode = .disabled,
super.key,
}) {
if (trackMainAxisExtent == null &&
(label != null || description != null || forceErrorText != null) &&
(layout?.vertical ?? false)) {
throw StateError(
'A vertical FSlider was given a label, description, or forceErrorText although it needs a trackMainAxisExtent. '
'To fix this, consider supplying a trackMainAxisExtent or changing the layout to horizontal.',
);
}
}