Using ThemeData’s ColorScheme.secondary.

Using components themes SwitchThemeData, ListTileThemeData, CheckboxThemeData,
and RadioThemeData.

By customizing the widget’s color properties.

Code before migration:

MaterialApp

theme:

ThemeData

toggleableActiveColor:

myColor

),

// ...

);

Code after migration:

final

ThemeData

theme

ThemeData

();

MaterialApp

theme:

theme

copyWith

switchTheme:

SwitchThemeData

thumbColor:

MaterialStateProperty

resolveWith

Color

>(