trackColor property Null safety

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:

StateLight themeDark theme
DefaultColors.grey.shade50Colors.grey.shade400
SelectedactiveColor with alpha 0x80activeColor with alpha 0x80
DisabledColor(0x52000000)Colors.white30

Implementation

final MaterialStateProperty<Color?>? trackColor;