trackColor property

MaterialStateProperty<Color?>? trackColor
final

The color of this Switch's track.

Resolved in the following states:

If null, then the value of activeTrackColor is used in the selected state and inactiveTrackColor in the default state. If that is also null, then the value of SwitchThemeData.trackColor is used. If that is also null, then the following colors are used:

State Light theme Dark theme
Default Colors.grey.shade50 Colors.grey.shade400
Selected activeColor activeColor
Disabled Color(0x52000000) Colors.white30

Implementation

final MaterialStateProperty<Color?>? trackColor;