labelColor property

Color? labelColor
final

Default TabBar parameter

The color of selected tab labels.

If null, then TabBarTheme.labelColor is used. If that is also null and ThemeData.useMaterial3 is true, ColorScheme.primary will be used, otherwise the color of the ThemeData.primaryTextTheme's TextTheme.bodyLarge text color is used.

If labelColor (or, if null, TabBarTheme.labelColor) is a MaterialStateColor, then the effective tab color will depend on the MaterialState.selected state, i.e. if the Tab is selected or not, ignoring unselectedLabelColor even if it's non-null.

The color specified in the labelStyle and the TabBarTheme.labelStyle do not affect the effective labelColor.

See also:

unselectedLabelColor, for color of unselected tab labels.

Implementation

final Color? labelColor;