FSlider constructor

FSlider({
  1. FSliderControl control = const .managedContinuous(),
  2. FSliderStyle style(
    1. FSliderStyle style
    )?,
  3. FLayout? layout,
  4. Widget? label,
  5. Widget? description,
  6. Widget errorBuilder(
    1. BuildContext context,
    2. String message
    ) = FFormFieldProperties.defaultErrorBuilder,
  7. List<FSliderMark> marks = const [],
  8. double? trackMainAxisExtent,
  9. double? trackHitRegionCrossExtent,
  10. FSliderTooltipControls tooltipControls = const .new(),
  11. Widget tooltipBuilder(
    1. FTooltipController controller,
    2. double value
    ) = _tooltipBuilder,
  12. String semanticValueFormatterCallback(
    1. double
    ) = _semanticValueFormatter,
  13. String semanticFormatterCallback(
    1. FSliderValue
    )?,
  14. ValueChanged<FSliderValue>? onEnd,
  15. FormFieldSetter<FSliderValue>? onSaved,
  16. VoidCallback? onReset,
  17. FormFieldValidator<FSliderValue>? validator,
  18. String? forceErrorText,
  19. bool enabled = true,
  20. AutovalidateMode autovalidateMode = .disabled,
  21. 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.',
    );
  }
}