How to set activeColor to SwitchThemeData in Flutter

217 views Asked by At

activeColor property is available inside Switch but not available in SwitchThemeData. How can we get the same effect as activeColor in SwitchThemeData as a global property for Switch

1

There are 1 answers

0
Saad On

the property toggleableActiveColor have been deprecated (according to flutter website)
you have to use ColorScheme.secondary. to change it's active color