Articles in this section
Category / Section

How to enable thumb while interacting the Flutter Slider (SfSlider) ?

1 min read

In Syncfusion® Flutter Sliders, you can configure the slider to display the thumb only during user interaction.

You can achieve this by using the thumb overlay feature. Set the thumbRadius property to zero in the SfSliderThemeData to hide the thumb during load time. The thumb overlay will then act as the thumb during interaction.

double _value= 50.0;
 
@override
Widget build(BuildContext) {
  return Scaffold(
    body: SfSliderTheme(
      data: SfSliderThemeData(
        thumbRadius: 0,
        overlayRadius: 10,
        overlayColor: Colors.blue,
      ),
      child: SfSlider(
          min: 0,
          max: 100,
          value: _value,
          onChanged: (dynamic newValue) {
            setState(() {
              _value = newValue;
            });
         }
       ),
     ),
  );
}

 

Output

Enable thumb while interaction

Check the following links for more features in Syncfusion® Flutter Sliders:

 

Live Samples

 

Blogs about Flutter Slider

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied