TopTabBar class

TopTabBar

Widget to create the top TabBar with built in space for nesting contingency, just provide the data to children parameter and you're done your Top TabBar is created like that. Customize the widget as per your liking, also specify if you need the TabBar to be primary or secondary,

Customise the look and feel of the TopTabBar by editing TabBar and TabBarView parameters as per your liking.

Remember all the customization that applies to parent, applies to nested TopTabBar as well.

Inheritance

Constructors

TopTabBar({Key? key, Key? tabBarKey, Key? tabBarViewKey, required List<TabItem> children, Decoration? indicator, Color? dividerColor, bool? enableFeedback, Color? indicatorColor, TabBarIndicatorSize? indicatorSize, Color? labelColor, EdgeInsetsGeometry? labelPadding, TextStyle? labelStyle, MouseCursor? mouseCursor, void onTap(int)?, MaterialStateProperty<Color?>? overlayColor, EdgeInsetsGeometry? padding, ScrollPhysics? physics, BorderRadius? splashBorderRadius, InteractiveInkFeatureFactory? splashFactory, Color? unselectedLabelColor, TextStyle? unselectedLabelStyle, ScrollPhysics? tabBarViewPhysics, Duration? animationDuration, int initialIndex = 0, bool primaryTabBar = true, bool isScrollable = false, double indicatorWeight = 2.0, double tabBarViewViewportFraction = 1.0, EdgeInsetsGeometry indicatorPadding = EdgeInsets.zero, Clip tabBarViewClipBehavior = Clip.hardEdge, bool automaticIndicatorColorAdjustment = true, DragStartBehavior dragStartBehavior = DragStartBehavior.start, DragStartBehavior tabBarViewDragStartBehavior = DragStartBehavior.start, TabAlignment? tabAlignment})
const

Properties

animationDuration → Duration?
Creates an object that manages the state required by TabBar and a TabBarView.
final
automaticIndicatorColorAdjustment → bool
Default TabBar parameter
final
children → List<TabItem>
List of TabItem to specifiy the data for the top tabbar.
final
dividerColor → Color?
Default TabBar parameter
final
dragStartBehavior → DragStartBehavior
Default TabBar parameter
final
enableFeedback → bool?
Default TabBar parameter
final
hashCode → int
The hash code for this object.
no setterinherited
indicator → Decoration?
Indicator that Defines the appearance of the selected tab.
final
indicatorColor → Color?
Default TabBar parameter
final
indicatorPadding → EdgeInsetsGeometry
Default TabBar parameter
final
indicatorSize → TabBarIndicatorSize?
Default TabBar parameter
final
indicatorWeight → double
Default TabBar parameter
final
initialIndex → int
The index you want to be selected initially.
final
isScrollable → bool
Default TabBar parameter
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
labelColor → Color?
Default TabBar parameter
final
labelPadding → EdgeInsetsGeometry?
Default TabBar parameter
final
labelStyle → TextStyle?
Default TabBar parameter
final
mouseCursor → MouseCursor?
Default TabBar parameter
final
onTap → void Function(int)?
Default TabBar parameter
final
overlayColor → MaterialStateProperty<Color?>?
Default TabBar parameter
final
padding → EdgeInsetsGeometry?
Default TabBar parameter
final
physics → ScrollPhysics?
Default TabBar parameter
final
primaryTabBar → bool
specifies if the topTabBar is primary or not, if false topTabBar is secondary.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
splashBorderRadius → BorderRadius?
Default TabBar parameter
final
splashFactory → InteractiveInkFeatureFactory?
Default TabBar parameter
final
tabAlignment → TabAlignment?
final
tabBarKey → Key?
Key for TabBar.
final
tabBarViewClipBehavior → Clip
Default TabBarView parameter
final
tabBarViewDragStartBehavior → DragStartBehavior
Default TabBarView parameter
final
tabBarViewKey → Key?
Key for TabBarView.
final
tabBarViewPhysics → ScrollPhysics?
Default TabBarView parameter
final
tabBarViewViewportFraction → double
Default TabBarView parameter
final
unselectedLabelColor → Color?
Default TabBar parameter
final
unselectedLabelStyle → TextStyle?
Default TabBar parameter
final

Methods

createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → State<TopTabBar>
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, 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 short, textual description of this widget.
inherited

Operators

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