onChanged property

ValueChanged<SfRangeValues>? onChanged

Called when the user is selecting a new values for the slider by dragging.

The range slider passes the new values to the callback but does not change its state until the parent widget rebuilds the range slider with new values.

If it is null, the range slider will be disabled.

This snippet shows how to create a numeric SfRangeSlider.

SfRangeValues _values = SfRangeValues(4.0, 8.0);

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


final ValueChanged<SfRangeValues>? onChanged;