onChangeEnd property Null safety
final
Called when the user is done selecting new values for the slider.
This differs from onChanged because it is only called once at the end of the interaction, while onChanged is called as the value is getting updated within the interaction.
This callback shouldn't be used to update the slider values (use onChanged for that). Rather, it should be used to know when the user has completed selecting a new values by ending a drag or a click.
RangeSlider(
values: _rangeValues,
min: 1.0,
max: 10.0,
onChanged: (RangeValues newValues) {
setState(() {
_rangeValues = newValues;
});
},
onChangeEnd: (RangeValues endValues) {
print('Ended change at $endValues');
},
)
See also:
- onChangeStart for a callback that is called when a value change begins.
Implementation
final ValueChanged<RangeValues>? onChangeEnd;