SfSlider constructor

const SfSlider({
  1. Key? key,
  2. dynamic min = 0.0,
  3. dynamic max = 1.0,
  4. required dynamic value,
  5. required ValueChanged? onChanged,
  6. ValueChanged? onChangeStart,
  7. ValueChanged? onChangeEnd,
  8. double? interval,
  9. double? stepSize,
  10. SliderStepDuration? stepDuration,
  11. int minorTicksPerInterval = 0,
  12. bool showTicks = false,
  13. bool showLabels = false,
  14. bool showDividers = false,
  15. bool enableTooltip = false,
  16. bool shouldAlwaysShowTooltip = false,
  17. Color? activeColor,
  18. Color? inactiveColor,
  19. LabelPlacement labelPlacement = LabelPlacement.onTicks,
  20. EdgeLabelPlacement edgeLabelPlacement = EdgeLabelPlacement.auto,
  21. NumberFormat? numberFormat,
  22. DateFormat? dateFormat,
  23. DateIntervalType? dateIntervalType,
  24. LabelFormatterCallback? labelFormatterCallback,
  25. TooltipTextFormatterCallback? tooltipTextFormatterCallback,
  26. SfSliderSemanticFormatterCallback? semanticFormatterCallback,
  27. SfTrackShape trackShape = const SfTrackShape(),
  28. SfDividerShape dividerShape = const SfDividerShape(),
  29. SfOverlayShape overlayShape = const SfOverlayShape(),
  30. SfThumbShape thumbShape = const SfThumbShape(),
  31. SfTickShape tickShape = const SfTickShape(),
  32. SfTickShape minorTickShape = const SfMinorTickShape(),
  33. SfTooltipShape tooltipShape = const SfRectangularTooltipShape(),
  34. Widget? thumbIcon,
})

Creates a horizontal SfSlider.

Implementation

const SfSlider(
    {Key? key,
    this.min = 0.0,
    this.max = 1.0,
    required this.value,
    required this.onChanged,
    this.onChangeStart,
    this.onChangeEnd,
    this.interval,
    this.stepSize,
    this.stepDuration,
    this.minorTicksPerInterval = 0,
    this.showTicks = false,
    this.showLabels = false,
    this.showDividers = false,
    this.enableTooltip = false,
    this.shouldAlwaysShowTooltip = false,
    this.activeColor,
    this.inactiveColor,
    this.labelPlacement = LabelPlacement.onTicks,
    this.edgeLabelPlacement = EdgeLabelPlacement.auto,
    this.numberFormat,
    this.dateFormat,
    this.dateIntervalType,
    this.labelFormatterCallback,
    this.tooltipTextFormatterCallback,
    this.semanticFormatterCallback,
    this.trackShape = const SfTrackShape(),
    this.dividerShape = const SfDividerShape(),
    this.overlayShape = const SfOverlayShape(),
    this.thumbShape = const SfThumbShape(),
    this.tickShape = const SfTickShape(),
    this.minorTickShape = const SfMinorTickShape(),
    this.tooltipShape = const SfRectangularTooltipShape(),
    this.thumbIcon})
    : isInversed = false,
      _sliderType = SliderType.horizontal,
      _tooltipPosition = null,
      assert(min != max),
      assert(interval == null || interval > 0),
      super(key: key);