ButtonsTabBar class

Inheritance
Implemented types

Constructors

ButtonsTabBar({Key? key, required List<Widget> tabs, TabController? controller, int duration = 250, Color? backgroundColor, Color? unselectedBackgroundColor, BoxDecoration? decoration, BoxDecoration? unselectedDecoration, TextStyle? labelStyle, TextStyle? unselectedLabelStyle, Color? splashColor, double borderWidth = 0, Color borderColor = Colors.black, Color unselectedBorderColor = Colors.black, ScrollPhysics physics = const BouncingScrollPhysics(), EdgeInsets contentPadding = const EdgeInsets.symmetric(horizontal: 4), EdgeInsets buttonMargin = const EdgeInsets.all(4), double labelSpacing = 4.0, double radius = 7.0, double elevation = 0, double? height = _kTabHeight, bool center = false, void onTap(int)?})

Properties

backgroundColor Color?
The background Color of the button on its selected state.
final
borderColor Color
The Color of solid Border for each button.
final
borderWidth double
The with of solid Border for each button. If no value is provided, the border is not drawn.
final
buttonMargin EdgeInsets
The EdgeInsets used for the Margin of the buttons.
final
center bool
Center the tab buttons
final
contentPadding EdgeInsets
The EdgeInsets used for the Padding of the buttons' content.
final
controller TabController?
This widget's selection and animation state.
final
decoration BoxDecoration?
The BoxDecoration of the button on its selected state.
final
duration int
The duration in milliseconds of the transition animation.
final
elevation double
The value of the elevation applied to each button.
final
hashCode int
The hash code for this object.
no setterinherited
height double?
Override the default height.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
labelSpacing double
The spacing between the Icon and the Text. If only one of those is provided, no spacing is applied.
final
labelStyle TextStyle?
The TextStyle of the button's Text on its selected state. The color provided on the TextStyle will be used for the Icon's color.
final
onTap → (void Function(int)?)
An optional callback that's called when the TabBar is tapped.
final
physics ScrollPhysics
The physics used for the ScrollController of the tabs list.
final
preferredSize Size
The size this widget would prefer if it were otherwise unconstrained.
no setteroverride
radius double
The value of the BorderRadius.circular applied to each button.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
splashColor Color?
The splash Color of the button.
final
tabs List<Widget>
Typically a list of two or more Tab widgets.
final
unselectedBackgroundColor Color?
The background Color of the button on its unselected state.
final
unselectedBorderColor Color
The Color of solid Border for each button. If no value is provided, the value of this.borderColor is used.
final
unselectedDecoration BoxDecoration?
The BoxDecoration of the button on its unselected state.
final
unselectedLabelStyle TextStyle?
The TextStyle of the button's Text on its unselected state. The color provided on the TextStyle will be used for the Icon's color.
final

Methods

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