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
-
- Object
- ChangeNotifier
- M3ENavigationBarController
Constructors
-
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.
selectis the bar'sonDestinationSelected. -
detach(
ValueChanged< int> select) → void -
Drops the bar when
selectis 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