We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

onChangeEnd and onChangeStart methods in sfSlider

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




2 Replies

LR Lakshmi Radha Krishnan Syncfusion Team November 18, 2021 06:27 AM UTC

Hi Ilias,  
 
Greetings from Syncfusion support. 
  
We have already considered your request as a feature and the status can be tracked from the feedback portal link.     
   
   
We have planned to include this feature in our Volume 4 2021 release, which is expected to be release at the end of December.  
     
If you have any more specification/suggestions to the feature request, you can add it as a comment in the portal.    
 
Disclaimer: The date for this feature implementation is tentative and not a commitment on our parts 
  
Regards,  
Lakshmi R.    



PG Praveen Gopalsamy Syncfusion Team December 20, 2021 01:31 PM UTC

Hi llias,  
 
We are glad to announce that our Essential Studio 2021 Volume 4 release v19.4.0.38 is rolled out and is available for download under the following link. 
 
 
Now you can get a call on interaction start and end using the onChangeStart and onChangeEnd callbacks. These callbacks are only used to notify the user about the start and end interaction, and it does not update the any sliders value. We had shown an example snippet using SfSlider. 
 
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. 
      }, 
    ), 
  ); 
} 
 
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance. 
 
Regards,            
Praveen G. 


Loader.
Up arrow icon