I am trying to change the thumb color of my slider.
Here is my code:
SliderTheme(
data: SliderThemeData(
thumbColor: Colors.pink,
),
child: Slider(
value: height.toDouble(),
min: 120,
max: 220,
onChanged: (double newValue){
setState(() {
height = newValue.toInt();
});
},
inactiveColor: Color(0xff8d8e98),
activeColor: Colors.white,
),
)
However if I remove activeColor: Colors.white
property from above code then I am getting the desired thumb color.
However if I add activeColor
parameter back then even thumb color changes.
How to get thumb color as pink and active color as white?
Here is my required output: