📋 Deep Dive · Intermediate

CupertinoMenuAnchor and modern Flutter menus

Menus are where Flutter apps most often feel “webby.” RawMenuAnchor is the shared primitive; Cupertino and Material both build on it.

Diagram: Cupertino Menu Anchor

Cupertino

CupertinoMenuAnchor (community-led, notably davidhicks980) gives iOS apps a menu that behaves like UIKit: dismiss physics, nesting, and focus that match platform expectations.

Material

MenuAnchor gains optional Material 3 animations (animated: true) and SubmenuButton.hoverOpenDelay for desktop hover behavior.

Decision table

TargetPrefer
iOS-first productCupertinoMenuAnchor
Desktop dense UIMenuAnchor + hoverOpenDelay
Cross-platform brandAdaptive wrapper choosing by platform

Pitfalls

  • Callback close order changed on RawMenuAnchor — read the breaking-change note before upgrading.
  • Do not rebuild the entire menu tree on every pointer event; keep anchors stable.
#Flutter#Cupertino#Material#Menus