onChangeEnd property

ValueChanged<double>? onChangeEnd
final

Called when the user is done selecting a new value for the slider.

This callback shouldn't be used to update the slider value (use onChanged for that), but rather to know when the user has completed selecting a new value by ending a drag.

link
CupertinoSlider(
  value: _cupertinoSliderValue.toDouble(),
  min: 1.0,
  max: 10.0,
  divisions: 10,
  onChanged: (double newValue) {
    setState(() {
      _cupertinoSliderValue = newValue.round();
    });
  },
  onChangeEnd: (double newValue) {
    print('Ended change on $newValue');
  },
)

See also:

  • onChangeStart for a callback that is called when a value change begins.

Implementation

final ValueChanged<double>? onChangeEnd;