labelColor property

Color? labelColor
final

The color of selected tab labels.

If null, then TabBarThemeData.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, TabBarThemeData.labelColor) is a WidgetStateColor, then the effective tab color will depend on the WidgetState.selected state, i.e. if the Tab is selected or not, ignoring unselectedLabelColor even if it's non-null.

When this color or the TabBarThemeData.labelColor is specified, it overrides the TextStyle.color specified for the labelStyle or the TabBarThemeData.labelStyle.

See also:

Implementation

final Color? labelColor;