onChangeEnd property
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 or a click.
Slider(
value: _duelCommandment.toDouble(),
min: 1.0,
max: 10.0,
divisions: 10,
label: '$_duelCommandment',
onChanged: (double newValue) {
setState(() {
_duelCommandment = 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