ShiftingTabBar class

A widget that displays a horizontal row of tabs with some kind of shifting animation.

Typically created instead of AppBar and in conjunction with a TabBarView.

If a TabController is not provided, then a DefaultTabController ancestor must be provided instead. The tab controller's TabController.length must equal the length of the tabs list.

Requires one of its ancestors to be a Material widget.

See also:

  • TabBarView, which displays page views that correspond to each tab.
Inheritance
Implemented types

Constructors

ShiftingTabBar({Key? key, required List<ShiftingTab> tabs, TabController? controller, Color? color, Brightness? brightness, double? labelFlex, TextStyle? labelStyle, bool forceUpperCase = true})
Creates a shifting tab bar.
const

Properties

brightness Brightness?
Describes the contrast of background color.
final
color Color?
The color of widget background.
final
controller TabController?
This widget's selection and animation state.
final
forceUpperCase bool
The option to disable upper-case style in labels
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
labelFlex double?
The amount of space that Text widget can take.
final
labelStyle TextStyle?
The text style of the tab labels.
final
preferredSize Size
The size this widget would prefer if it were otherwise unconstrained.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tabs List<ShiftingTab>
Typically a list of two or more ShiftingTab widgets.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _ShiftingTabBarState
Creates the mutable state for this widget at a given location in the tree.
override
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}) 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 short, textual description of this widget.
inherited

Operators

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