controller property

GlassMenuController? controller
final

Optional controller to drive the menu imperatively (GlassMenuController.open / GlassMenuController.close) instead of — or in addition to — tapping the trigger.

Tapping the trigger goes through _GlassMenuState._toggleMenu, which is gated on the morph progress (a close that lands while the menu is still expanding is ignored). The controller commands _GlassMenuState._openMenu / _GlassMenuState._closeMenu directly, so it is deterministic for any timing — useful when an external gesture owner (e.g. a central gesture arena) decides when to show and dismiss the menu.

Implementation

final GlassMenuController? controller;