Hello,
In the SfLinearGauge I use the methods onchangeStart, OnChangeEnd and OnChanged.
Now I want to use the Sfslider but the onchangeStart and OnChangeEnd methods are not supported.
It is very important for my project to send the value when the user release the slider button and not continusly while the button moving.
Is there any way to get a callback every time the user release the slider button? Like the " OnChangeEnd" method of "SfLinearGauge".
I use the slider to send values to an MQTT broker. Now the slider sends too much values while the user moves the button. I want to send one value at the end of movement.
I have added the SfSlider as child of a Gesturedetector but I can't get the release button event. I think the widget not send the event to the parent window.
Thanks
double _value = 4.0;
@override
Widget build(BuildContext context) {
return Scaffold(
body: SfSlider(
min: 0,
max: 10,
value: _value,
onChangeStart: (dynamic startValue) {
//Called when the user starts selecting a new value for the slider.
},
onChanged: (dynamic newValue) {
setState(() {
_value = newValue;
});
},
onChangeEnd: (dynamic endValue) {
//Called when the user ends selecting a new value for the slider.
},
),
);
} |