DesignTabController class

Which tab is selected, and where a swipe or a change has got to: Material's TabController without Material. A DesignTabBar and a DesignTabView given the same one follow each other. The caller makes it, with a TickerProvider (TickerProviderStateMixin), and disposes it.

DesignTabController(length: 2, vsync: vsync)
Inheritance

Constructors

DesignTabController({required int length, int initialIndex = 0, required TickerProvider vsync, double dampingRatio = 1, double stiffness = 700})
length tabs, initialIndex selected; a change runs on the spring dampingRatio and stiffness.

Properties

animation → Animation<double>
Where the selection stands: index at rest, between two tabs while the pages are swiped or a change runs (1.4: 40% of the way from the second tab to the third). An underdamped spring runs past its tab.
no setter
dampingRatio → double
The change's spring damping ratio (ζ). Defaults to 1.
final
hashCode → int
The hash code for this object.
no setterinherited
hasListeners → bool
Whether any listeners are currently registered.
no setterinherited
index ↔ int
The selected tab. Set, it jumps there; animateTo springs.
getter/setter pair
indexIsChanging → bool
Whether animateTo's spring is running.
no setter
length → int
How many tabs there are.
final
offset → double
How far a swipe has moved the pages from index: -1 to 1.
no setter
previousIndex → int
The tab selected before index.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
stiffness → double
The change's spring stiffness (k). Defaults to 700.
final

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
animateTo(int value) → void
Selects value on the spring, from wherever the selection stands and at its speed.
dispose() → void
Discards any resources used by the object.
override
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
toString() → String
A string representation of this object.
inherited

Operators

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