TabBarTheme class

Defines default property values for descendant TabBar widgets.

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

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

See also:

  • TabBarThemeData, which describes the actual configuration of a tab bar theme.
Inheritance
Mixed-in types
Annotations

Constructors

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

Properties

child → Widget
The widget below this widget in the tree.
finalinherited
data → TabBarThemeData
The properties used for all descendant TabBar widgets.
no setter
dividerColor → Color?
Overrides the default value for TabBar.dividerColor.
no setter
dividerHeight → double?
Overrides the default value for TabBar.dividerHeight.
no setter
hashCode → int
The hash code for this object.
no setterinherited
indicator → Decoration?
Overrides the default value for TabBar.indicator.
no setter
indicatorAnimation → TabIndicatorAnimation?
Overrides the default value for TabBar.indicatorAnimation.
no setter
indicatorColor → Color?
Overrides the default value for TabBar.indicatorColor.
no setter
indicatorSize → TabBarIndicatorSize?
Overrides the default value for TabBar.indicatorSize.
no setter
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
labelColor → Color?
Overrides the default value for TabBar.labelColor.
no setter
labelPadding → EdgeInsetsGeometry?
Overrides the default value for TabBar.labelPadding.
no setter
labelStyle → TextStyle?
Overrides the default value for TabBar.labelStyle.
no setter
mouseCursor → WidgetStateProperty<MouseCursor?>?
Overrides the default value of TabBar.mouseCursor.
no setter
overlayColor → WidgetStateProperty<Color?>?
Overrides the default value for TabBar.overlayColor.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
splashFactory → InteractiveInkFeatureFactory?
Overrides the default value for TabBar.splashFactory.
no setter
tabAlignment → TabAlignment?
Overrides the default value for TabBar.tabAlignment.
no setter
textScaler → TextScaler?
Overrides the default value for TabBar.textScaler.
no setter
unselectedLabelColor → Color?
Overrides the default value for TabBar.unselectedLabelColor.
no setter
unselectedLabelStyle → TextStyle?
Overrides the default value for TabBar.unselectedLabelStyle.
no setter

Methods

copyWith({Decoration? indicator, Color? indicatorColor, TabBarIndicatorSize? indicatorSize, Color? dividerColor, double? dividerHeight, Color? labelColor, EdgeInsetsGeometry? labelPadding, TextStyle? labelStyle, Color? unselectedLabelColor, TextStyle? unselectedLabelStyle, WidgetStateProperty<Color?>? overlayColor, InteractiveInkFeatureFactory? splashFactory, WidgetStateProperty<MouseCursor?>? mouseCursor, TabAlignment? tabAlignment, TextScaler? textScaler, TabIndicatorAnimation? indicatorAnimation}) → TabBarTheme
Creates a copy of this object but with the given fields replaced with the new values.
createElement() → InheritedElement
Inflates this configuration to a concrete instance.
inherited
debugDescribeChildren() → List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
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
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String
Returns a one-line detailed description of the object.
inherited
toStringShort() → String
A brief description of this object, usually just the runtimeType and the hashCode.
inherited
updateShouldNotify(covariant TabBarTheme oldWidget) → bool
Whether the framework should notify widgets that inherit from this widget.
override
wrap(BuildContext context, Widget child) → Widget
Return a copy of this inherited theme with the specified child.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

lerp(TabBarTheme a, TabBarTheme b, double t) → TabBarTheme
Linearly interpolate between two tab bar themes.
of(BuildContext context) → TabBarThemeData
Returns the configuration data from the closest TabBarTheme ancestor. If there is no ancestor, it returns ThemeData.tabBarTheme.