dragMode property

SliderDragMode dragMode
final

Represents the behavior of thumb dragging in the SfRangeSelector.

When dragMode is set to SliderDragMode.onThumb, individual thumb can be moved by dragging it.

When dragMode is set to SliderDragMode.betweenThumbs, both the thumbs can be moved at the same time by dragging in the area between start and end thumbs. The range between the start and end thumb will always be the same. Hence, it is not possible to move the individual thumb.

When dragMode is set to SliderDragMode.both, individual thumb can be moved by dragging it, and also both the thumbs can be moved at the same time by dragging in the area between start and end thumbs.

Defaults to SliderDragMode.onThumb.

This code snippet shows the behavior of thumb dragging.


SfRangeSelector(
  min: 0.0,
  max: 10.0,
  interval: 2,
  showLabels: true,
  dragMode: SliderDragMode.betweenThumbs,
  initialValues: SfRangeValues(4.0,8.0),
  child: Container(
      height: 200,
      color: Colors.green[100],
   ),
)

Implementation

final SliderDragMode dragMode;