stepSize property Null safety

double? stepSize
final

Option to select discrete value.

stepSize doesn’t work for DateTime slider.

For example, if min is 0.0 and max is 10.0 and stepSize is 2.0, the slider will move the thumb 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 SfSlider.

double _value = 4.0;

SfSlider(
  min: 0.0,
  max: 10.0,
  value: _value,
  stepSize: 2,
  onChanged: (dynamic newValue) {
    setState(() {
      _value = newValue;
    });
   },
)

Implementation

final double? stepSize;