TabBarThemeData class

Defines default property values for descendant TabBar widgets.

Descendant widgets obtain the current TabBarThemeData object using TabBarTheme.of(context).data. Instances of TabBarThemeData can be customized with TabBarThemeData.copyWith.

Typically a TabBarThemeData is specified as part of the overall Theme with ThemeData.tabBarTheme.

All TabBarThemeData properties are null by default. When null, the TabBar will use the values from ThemeData if they exist, otherwise it will provide its own defaults. See the individual TabBar properties for details.

See also:

  • TabBar, which displays a row of tabs.
  • ThemeData, which describes the overall theme information for the application.
Mixed-in types
Annotations

Constructors

TabBarThemeData({Decoration? indicator, Color? indicatorColor, TabBarIndicatorSize? indicatorSize, Color? dividerColor, double? dividerHeight, Color? labelColor, EdgeInsetsGeometry? labelPadding, TextStyle? labelStyle, Color? unselectedLabelColor, TextStyle? unselectedLabelStyle, MaterialStateProperty<Color?>? overlayColor, InteractiveInkFeatureFactory? splashFactory, MaterialStateProperty<MouseCursor?>? mouseCursor, TabAlignment? tabAlignment, TextScaler? textScaler, TabIndicatorAnimation? indicatorAnimation})
Creates a tab bar theme that can be used with ThemeData.tabBarTheme.
const

Properties

dividerColor Color?
Overrides the default value for TabBar.dividerColor.
final
dividerHeight double?
Overrides the default value for TabBar.dividerHeight.
final
hashCode int
The hash code for this object.
no setteroverride
indicator Decoration?
Overrides the default value for TabBar.indicator.
final
indicatorAnimation TabIndicatorAnimation?
Overrides the default value for TabBar.indicatorAnimation.
final
indicatorColor Color?
Overrides the default value for TabBar.indicatorColor.
final
indicatorSize TabBarIndicatorSize?
Overrides the default value for TabBar.indicatorSize.
final
labelColor Color?
Overrides the default value for TabBar.labelColor.
final
labelPadding EdgeInsetsGeometry?
Overrides the default value for TabBar.labelPadding.
final
labelStyle TextStyle?
Overrides the default value for TabBar.labelStyle.
final
mouseCursor MaterialStateProperty<MouseCursor?>?
The cursor for a mouse pointer when it enters or is hovering over the individual tab widgets.
final
overlayColor MaterialStateProperty<Color?>?
Overrides the default value for TabBar.overlayColor.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
splashFactory InteractiveInkFeatureFactory?
Overrides the default value for TabBar.splashFactory.
final
tabAlignment TabAlignment?
Overrides the default value for TabBar.tabAlignment.
final
textScaler TextScaler?
Overrides the default value for TabBar.textScaler.
final
unselectedLabelColor Color?
Overrides the default value for TabBar.unselectedLabelColor.
final
unselectedLabelStyle TextStyle?
Overrides the default value for TabBar.unselectedLabelStyle.
final

Methods

copyWith({Decoration? indicator, Color? indicatorColor, TabBarIndicatorSize? indicatorSize, Color? dividerColor, double? dividerHeight, Color? labelColor, EdgeInsetsGeometry? labelPadding, TextStyle? labelStyle, Color? unselectedLabelColor, TextStyle? unselectedLabelStyle, MaterialStateProperty<Color?>? overlayColor, InteractiveInkFeatureFactory? splashFactory, MaterialStateProperty<MouseCursor?>? mouseCursor, TabAlignment? tabAlignment, TextScaler? textScaler, TabIndicatorAnimation? indicatorAnimation}) TabBarThemeData
Creates a copy of this object but with the given fields replaced with the new values.
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringShort() String
A brief description of this object, usually just the runtimeType and the hashCode.
inherited

Operators

operator ==(Object other) bool
The equality operator.
override

Static Methods

lerp(TabBarThemeData a, TabBarThemeData b, double t) TabBarThemeData
Linearly interpolate between two tab bar themes.