TabBarTheme class
Defines a theme for TabBar widgets.
A tab bar theme describes the color of the tab label and the size/shape of the TabBar.indicator.
Descendant widgets obtain the current theme's TabBarTheme object using
TabBarTheme.of(context)
. Instances of TabBarTheme can be customized with
TabBarTheme.copyWith.
See also:
- Mixed in types
- Annotations
Constructors
-
TabBarTheme({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}) -
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
- 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}) → TabBarTheme - 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.
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
-
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(
TabBarTheme a, TabBarTheme b, double t) → TabBarTheme - Linearly interpolate between two tab bar themes.
-
of(
BuildContext context) → TabBarTheme - The data from the closest TabBarTheme instance given the build context.