SfRangeSlider.vertical constructor Null safety

const SfRangeSlider.vertical(
  1. {Key? key,
  2. dynamic min = 0.0,
  3. dynamic max = 1.0,
  4. required SfRangeValues values,
  5. required ValueChanged<SfRangeValues>? onChanged,
  6. double? interval,
  7. double? stepSize,
  8. SliderStepDuration? stepDuration,
  9. int minorTicksPerInterval = 0,
  10. bool showTicks = false,
  11. bool showLabels = false,
  12. bool showDividers = false,
  13. bool enableTooltip = false,
  14. bool enableIntervalSelection = false,
  15. SliderDragMode dragMode = SliderDragMode.onThumb,
  16. bool isInversed = false,
  17. Color? inactiveColor,
  18. Color? activeColor,
  19. LabelPlacement labelPlacement = LabelPlacement.onTicks,
  20. NumberFormat? numberFormat,
  21. DateFormat? dateFormat,
  22. DateIntervalType? dateIntervalType,
  23. LabelFormatterCallback? labelFormatterCallback,
  24. TooltipTextFormatterCallback? tooltipTextFormatterCallback,
  25. RangeSliderSemanticFormatterCallback? semanticFormatterCallback,
  26. SfTrackShape trackShape = const SfTrackShape(),
  27. SfDividerShape dividerShape = const SfDividerShape(),
  28. SfOverlayShape overlayShape = const SfOverlayShape(),
  29. SfThumbShape thumbShape = const SfThumbShape(),
  30. SfTickShape tickShape = const SfTickShape(),
  31. SfTickShape minorTickShape = const SfMinorTickShape(),
  32. SfTooltipShape tooltipShape = const SfRectangularTooltipShape(),
  33. Widget? startThumbIcon,
  34. Widget? endThumbIcon,
  35. SliderTooltipPosition tooltipPosition = SliderTooltipPosition.left}
)

Creates a vertical SfRangeSlider.

TooltipPosition

Enables tooltip in left or right position for vertical range slider.

Example

This snippet shows how to create a vertical SfRangeSlider with right side tooltip

SfRangeValues _values = SfRangeValues (30,60));

@override
Widget build(BuildContext context) {
  return MaterialApp(
     home: Scaffold(
         body: Center(
             child: SfRangeSlider.vertical(
                  min: 10.0,
                  max: 100.0,
                    values: _values,
                    enableTooltip: true,
                    tooltipPosition: SliderTooltipPosition.right,
                    onChanged: (dynamic newValues) {
                        setState(() {
                            _values = newValues;
                        });
                  },
             )
          )
      )
  );
}

See also:

  • Check the default constructor for horizontal range slider.

Implementation

const SfRangeSlider.vertical(
    {Key? key,
    this.min = 0.0,
    this.max = 1.0,
    required this.values,
    required this.onChanged,
    this.interval,
    this.stepSize,
    this.stepDuration,
    this.minorTicksPerInterval = 0,
    this.showTicks = false,
    this.showLabels = false,
    this.showDividers = false,
    this.enableTooltip = false,
    this.enableIntervalSelection = false,
    this.dragMode = SliderDragMode.onThumb,
    this.isInversed = false,
    this.inactiveColor,
    this.activeColor,
    this.labelPlacement = LabelPlacement.onTicks,
    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.startThumbIcon,
    this.endThumbIcon,
    SliderTooltipPosition tooltipPosition = SliderTooltipPosition.left})
    : _sliderType = SliderType.vertical,
      _tooltipPosition = tooltipPosition,
      assert(tooltipShape is! SfPaddleTooltipShape),
      assert(min != max),
      assert(interval == null || interval > 0),
      super(key: key);