enableIntervalSelection property

bool enableIntervalSelection
final

Option to select the particular interval based on the position of the tap or click.

Both the thumbs are moved to the selected interval if the enableIntervalSelection property is true, otherwise the nearest thumb is moved to the touch position.

Defaults to false.

This snippet shows how to enable selecting the particular interval in SfRangeSlider.

SfRangeValues  _values = SfRangeValues(40.0, 80.0);

SfRangeSlider(
   min: 0.0,
   max: 100.0,
   values: _values,
   interval: 20,
   showLabels: true,
   enableTooltip: true,
   enableIntervalSelection: true,
   showTicks: true,
   onChanged: (SfRangeValues newValues) {
    setState(() {
      _values = newValues;
    });
   },
)

Implementation

final bool enableIntervalSelection;