USideMenuController class

Controls a USideMenu: selection, expanded/rail/drawer mode, search, pinned items, open/close. final USideMenuController menu = USideMenuController(selectedId: "home");

Inheritance

Constructors

USideMenuController({String? selectedId, USideMenuMode? mode, Set<String>? expandedGroups, Set<String>? pinnedIds})

Properties

collapsed ↔ bool
True when collapsed to a rail.
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
hasListeners → bool
Whether any listeners are currently registered.
no setterinherited
isDrawerMode → bool
True when shown as a drawer (phones).
no setter
isDrawerOpen → bool
True while the drawer is open.
no setter
mode ↔ USideMenuMode?
Forced mode, or null to follow screen width.
getter/setter pair
pinnedIds → Set<String>
Ids of pinned items.
no setter
resolvedMode → USideMenuMode
Mode actually shown now.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
Current search text.
getter/setter pair
selectedId ↔ String?
Id of the selected item.
getter/setter pair

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
attachDrawer(VoidCallback open, VoidCallback close) → void
Used by USideMenu to connect its drawer.
closeDrawer() → void
Closes the drawer.
cycleMode() → void
Switches expanded → rail → hidden.
detachDrawer() → void
Used by USideMenu to disconnect its drawer.
dispose() → void
Discards any resources used by the object.
override
isGroupExpanded(String id) → bool
True when a group is open.
isPinned(String id) → bool
True when an item is pinned.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
openDrawer() → void
Opens the drawer (phones).
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
select(String id) → void
Selects an item (and closes the drawer on phones).
setGroupExpanded(String id, bool expanded) → void
Opens or closes a group.
toggleCollapsed() → void
Expands/collapses the menu.
toggleDrawer() → void
Opens/closes the drawer.
toggleGroup(String id) → void
Opens/closes a group.
togglePin(String id) → void
Pins/unpins an item.
toString() → String
A string representation of this object.
inherited

Operators

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