AdaptiveTabBar class

Apps often have different categories of content or features available to users. Naturally, you want your users to be able to quickly glance at each option and move between categories with a simple swipe. That’s where the Flutter TabBar class comes in.

Use this widget to create a tabBar with platform-specific styling and behavior:

Inheritance
Implementers
Available extensions

Constructors

AdaptiveTabBar({Key? key, CoreProperties<TabBarAndroidProperty, TabBarIOSProperty>? properties, EdgeInsetsGeometry margin = const EdgeInsets.symmetric(horizontal: 6.0), bool isExpended = true, TextStyle? unselectedLabelStyle, TextStyle? selectedLabelStyle, IconThemeData? unselectedIconTheme, IconThemeData? selectedIconTheme, Color? unselectedTabColor, Color? selectedTabColor, ValueChanged<int>? onChanged, TabController? controller, required List<Widget> tabs})
Creates an instance of AdaptiveTabBar.
const

Properties

builders CoreAdaptiveBuilder<Builder<ThemeData, TabBarAndroidProperty?>, Builder<CupertinoThemeData, TabBarIOSProperty?>>?
Builders for adapting the component based on platform and theme.
finalinherited
controller TabController?
The controller that manages which tab is selected.
final
hashCode int
The hash code for this object.
no setterinherited
isExpended bool
Whether the tab-bar should expand to fill available width.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
margin EdgeInsetsGeometry
The margin around the tab bar.
final
onChanged ValueChanged<int>?
Called when a tab is selected.
final
properties CoreProperties<TabBarAndroidProperty, TabBarIOSProperty>?
Properties for customizing the visual and functional aspects of the adaptive component.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectedIconTheme IconThemeData?
The theme for the selected icon.
final
selectedLabelStyle TextStyle?
The text style for the selected label.
final
selectedTabColor Color?
The color of the tab when selected.
final
tabs List<Widget>
List of Widget representing the tabs in the tab bar.
final
unselectedIconTheme IconThemeData?
The theme for the unselected icon.
final
unselectedLabelStyle TextStyle?
The text style for the unselected label.
final
unselectedTabColor Color?
The color of the tab when unselected.
final

Methods

android(BuildContext context, [TabBarAndroidProperty? property]) Widget
applyDisabledEffect(bool isDisabled, [double disabledOpacity = 0.5, bool? ignoringPointer]) Widget

Available on Widget, provided by the ApplyDisabledEffect extension

Wraps the current widget with an AnimatedOpacity to visually indicate whether the widget is enabled or disabled.
build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
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
getAdaptiveComponent(BuildContext context) Widget
inherited
iOS(BuildContext context, [TabBarIOSProperty? property]) Widget
margeWith(Widget? child, [double? space = 4.0, Axis direction = Axis.horizontal]) Widget

Available on Widget, provided by the MergeToChild extension

Merges the current widget with child, separated by a SizedBox.
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
validate(BuildContext context) → dynamic

Operators

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