M3ENavigationDrawerController class
Selects a destination and opens or closes a navigation drawer.
Pass it to M3ENavigationDrawer.controller. select runs the drawer's
onDestinationSelected. index follows the drawer's selected index.
attach does not notify listeners.
- Inheritance
-
- Object
- ChangeNotifier
- M3ENavigationDrawerController
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
- isOpen ↔ bool
-
Whether a dismissible or modal drawer is open.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
attach(
{required ValueChanged< int> select, required ValueChanged<bool> setOpen, required int index, required bool isOpen}) → void - Binds the drawer.
-
close(
) → void - Closes a dismissible or modal drawer.
-
detach(
ValueChanged< int> select) → void -
Drops the drawer when
selectis still the bound callback. -
dispose(
) → void -
Discards any resources used by the object.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
open(
) → void - Opens a dismissible or modal drawer.
-
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 drawer to select
index. -
toggle(
) → void - Switches between open and closed.
-
toString(
) → String -
A string representation of this object.
inherited
-
updateIndex(
int index) → void - Stores the drawer's current index.
-
updateIsOpen(
{required bool isOpen}) → void - Stores whether the drawer is open.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited