ArnaTabView class

Implements a tabbed layout and behavior structure.

The view lays out the tab bar at the top and the content below the tab bar.

A controller can be used to provide an initially selected tab index and manage subsequent tab changes. If a controller is not specified, the view will create its own ArnaTabController and manage it internally. Otherwise it's up to the owner of controller to call dispose on it after finish using it.

Tabs' contents are built with the provided tabs at the active tab index. Inactive tabs will be moved Offstage and their animations disabled.

See also:

Inheritance

Constructors

ArnaTabView({Key? key, required List<ArnaTab> tabs, ArnaTabController? controller, ValueChanged<int>? onTap, ValueChanged<int>? onTabClosed, VoidCallback? onAddPressed, int currentIndex = 0, String? restorationId})
Creates a layout for applications with a tab bar at the top.

Properties

controller ArnaTabController?
Controls the currently selected tab index of the tabs. Providing a different controller will also update the view's current active index to the new controller's index value.
final
currentIndex int
The index into tabs of the current active tab.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onAddPressed VoidCallback?
Called when the add button is pressed.
final
onTabClosed ValueChanged<int>?
Called when one of the tabs is closed.
final
onTap ValueChanged<int>?
The callback that is called when a tab is tapped.
final
restorationId String?
Restoration ID to save and restore the state of the ArnaTabView.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tabs List<ArnaTab>
The interactive tabs laid out within the tab bar.
final

Methods

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