stepSize property

double? stepSize
final

Option to select discrete values.

stepSize doesn’t work for DateTime range slider.

For example, if min is 0.0 and max is 10.0 and stepSize is 2.0, the range slider will move the thumbs at 0.0, 2.0, 4.0, 6.0, 8.0 and 10.0.

Defaults to null. Must be greater than 0.

This snippet shows how to set numeric stepSize in SfRangeSlider.

SfRangeValues _values = SfRangeValues(4.0, 8.0);

SfRangeSlider(
  min: 0.0,
  max: 10.0,
  values: _values,
  stepSize: 2,
  onChanged: (SfRangeValues newValues) {
    setState(() {
      _values = newValues;
    });
   },
)

Implementation

final double? stepSize;