M3ENavigationBarController class

Selects a destination and shows or hides the bar from outside.

Pass it to M3ENavigationBar.controller. select runs the bar's onDestinationSelected. index follows the bar's selected index. show and hide apply when hideOnScroll is on.

Inheritance

Constructors

M3ENavigationBarController({int index = 0, bool visible = true})
Creates a controller at index.

Properties

hashCode → int
The hash code for this object.
no setterinherited
hasListeners → bool
Whether any listeners are currently registered.
no setterinherited
index ↔ int
Selected destination index.
getter/setter pair
isAttached → bool
Whether attach has been called.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
visible ↔ bool
Whether the bar is shown. Scroll and show / hide update this.
getter/setter pair

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
attach(ValueChanged<int> select, int index) → void
Binds the bar. select is the bar's onDestinationSelected.
detach(ValueChanged<int> select) → void
Drops the bar when select is still the bound callback.
dispose() → void
Discards any resources used by the object.
inherited
hide() → void
Hides the bar when hide-on-scroll is on.
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
select(int index) → void
Asks the attached bar to select index.
show() → void
Shows the bar when hide-on-scroll is on.
toString() → String
A string representation of this object.
inherited
updateIndex(int index) → void
Stores the bar's current index.
updateVisible({required bool visible}) → void
Stores whether the bar is shown.

Operators

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