TabViewController class

Manages the tabs and selected tab of a TabView.

A controller owns its tab list. Supply it to TabView.controller to update the view by calling methods such as select, add, and removeAt.

Mixed-in types

Constructors

TabViewController({List<Tab> initialTabs = const [], int initialIndex = 0})
Creates a controller with initialTabs and the initially selected tab.

Properties

hashCode → int
The hash code for this object.
no setterinherited
hasListeners → bool
Whether any listeners are currently registered.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
selectedIndex → int
The index of the selected tab.
no setter
selectedTab → Tab?
The selected tab, or null when tabs is empty.
no setter
tabs → List<Tab>
The tabs managed by this controller.
no setter

Methods

add(Tab tab, {bool select = true}) → void
Adds tab after the existing tabs.
addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
dispose() → void
Discards any resources used by the object.
inherited
insert(int index, Tab tab, {bool select = true}) → void
Inserts tab at index.
move(int oldIndex, int newIndex) → void
Moves the tab at oldIndex to newIndex.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
removeAt(int index) → Tab
Removes and returns the tab at index.
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
replaceTabs(List<Tab> tabs) → void
Replaces all managed tabs with tabs.
select(int index) → void
Selects the tab at index.
toString() → String
A string representation of this object.
inherited

Operators

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