MoonTabBar class

Inheritance

Constructors

MoonTabBar({Key? key, bool isExpanded = false, double? gap, double? height, double? width, Duration? transitionDuration, Curve? transitionCurve, EdgeInsetsGeometry? padding, int initialIndex = 0, MoonTabBarSize? tabBarSize, Decoration? decoration, TabController? tabController, ValueChanged<int>? onTabChanged, required List<MoonTab>? tabs})
Creates a Moon Design tab bar.
const
MoonTabBar.custom({Key? key, bool isExpanded = false, double? gap, double? height, double? width, Duration? transitionDuration, Curve? transitionCurve, EdgeInsetsGeometry? padding, int initialIndex = 0, MoonTabBarSize? tabBarSize, Decoration? decoration, TabController? tabController, ValueChanged<int>? onTabChanged, required List<MoonCustomTabBuilder>? customTabs})
Creates a Moon Design custom tab bar.
const
MoonTabBar.pill({Key? key, bool isExpanded = false, double? gap, double? height, double? width, Duration? transitionDuration, Curve? transitionCurve, EdgeInsetsGeometry? padding, int initialIndex = 0, MoonTabBarSize? tabBarSize, Decoration? decoration, TabController? tabController, ValueChanged<int>? onTabChanged, required List<MoonPillTab>? pillTabs})
Creates a Moon Design pill tab bar.
const

Properties

customTabs List<MoonCustomTabBuilder>?
The list of custom tabs to display as the children of the custom tab bar. At least one child is required when this property is used. This property cannot be used in conjunction with the tabs or pillTabs properties; both must be set to null.
final
decoration Decoration?
The custom decoration of the tab bar.
final
gap double?
The gap between the tab bar tabs.
final
hashCode int
The hash code for this object.
no setterinherited
height double?
The height of the tab bar.
final
initialIndex int
The index of the initially selected tab. This property is overridden by the tabController's initial index if the tabController is provided. For external updates to the tab index, use tabController.
final
isExpanded bool
Whether the tab bar is expanded to its full available width horizontally or resizes to fit its content.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onTabChanged ValueChanged<int>?
The callback that returns the index of the currently selected tab.
final
padding EdgeInsetsGeometry?
The padding of the tab bar.
final
pillTabs List<MoonPillTab>?
The list of pill tabs to display as the children of the pill tab bar. At least one child is required when this property is used. This property cannot be used in conjunction with the tabs or customTabs properties; both must be set to null.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tabBarSize MoonTabBarSize?
The size of the tab bar.
final
tabController TabController?
The external controller for managing tab selection and animation in tab bar. If tabController is provided, then initialIndex is ignored and tabController's index is used instead.
final
tabs List<MoonTab>?
The list of tabs to display as the children of the tab bar. At least one child is required when this property is used. This property cannot be used in conjunction with the pillTabs or customTabs properties; both must be set to null.
final
transitionCurve Curve?
The curve of the tab bar transition animation.
final
transitionDuration Duration?
The duration of the tab bar transition animation.
final
width double?
The width of the tab bar.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<MoonTabBar>
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