This is the picture i got from Syncfusion’s docs.
Syncfusion Slider
Here’s what I want to achieve,
A slider track which has active color, inactive color, and a disabled color.
the disabled color will be applied between the user’s value to max value.
lets say, I input value of 80, thus the color red will be applied between 80 – 100.
I’ve tried restricting the onChanged property to not go over the user’s given value. i.e 80.
I just need the color to be different between users value – max value.
2
Answers
You may try like this
We have achieved your requirements using the trackShape and thumShape properties in the Slider. We extended the SfTrackShape and SfThumbShape classes and customized the track and thumb colors based on the slider values in the paint method. We have then assigned these classes to the trackShape and thumShape properties. We have shared the complete code snippet below for your reference.
Code snippet:
Screenshot:
Live Sample, https://flutter.syncfusion.com/#/slider/customization/shape-customization