TabbedViewController class

The TabbedView controller.

Stores tabs and selection tab index.

When a property is changed, the TabbedView is notified and updated appropriately.

Remember to dispose of the TabbedView when it is no longer needed. This will ensure we discard any resources used by the object.

Inheritance

Constructors

TabbedViewController(List<TabData> _tabs, {OnReorder? onReorder, dynamic data, bool reorderEnable = true})

Properties

data → dynamic
final
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
length int
no setter
onReorder OnReorder?
final
reorderEnable bool
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectedIndex int?
The selected tab index
getter/setter pair
selectedTab TabData?
Gets the selected tab.
no setter
tabs UnmodifiableListView<TabData>
no setter

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
addTab(TabData tab) → void
Adds a TabData.
addTabs(Iterable<TabData> iterable) → void
Adds multiple TabData.
dispose() → void
Discards any resources used by the object. After this is called, the object is not in a usable state and should be discarded (calls to addListener will throw after the object is disposed).
inherited
getTabByIndex(int index) TabData
Gets a tab given an index.
insertTab(int index, TabData tab) → void
Inserts TabData at position index in the tabs.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
removeTab(int tabIndex) TabData
Removes a tab.
removeTabs() → void
Removes all tabs.
reorderTab(int oldIndex, int newIndex) → void
Reorders a tab.
setTabs(Iterable<TabData> iterable) → void
Replaces all tabs.
toString() String
A string representation of this object.
inherited

Operators

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