components/menus/m3e_menus library

Classes

M3EMenu
A Material 3 Expressive menu (Compose DropdownMenu + DropdownMenuPopup).
M3EMenuColors
Resolved colors for one M3EMenuColorStyle.
M3EMenuContent
Renders a tree of M3EMenuNodes inside one elevated menu surface.
M3EMenuDivider
Horizontal rule between menu sections inside one elevated surface.
M3EMenuDividerWidget
Horizontal divider between menu items inside one elevated surface.
M3EMenuEntry
Standard action row (Compose DropdownMenuItem).
M3EMenuGroup
Elevated surface / subgroup of items with optional section label.
M3EMenuItem
A single interactive row inside an M3EMenu popup.
M3EMenuNode
A node in an M3EMenu content tree.
M3EMenuPlacement
Computed placement for an anchored menu popup.
M3EMenuPlacer
Collision-aware menu placement (Compose popup position provider).
M3EMenuPopup<T>
Overlay surface for showM3EMenu / M3EMenu (Compose DropdownMenuPopup).
M3EMenuSelectable
Single-select row with a trailing check when selected.
M3EMenuSubmenu
Cascading submenu opened from a parent row.
M3EMenuTheme
Theme values for M3EMenu (Compose MenuDefaults expressive tokens).
M3EMenuToggleable
Toggleable row (Compose checked menu item).
M3EMenuWidget
Row whose body is an arbitrary child (host-provided content).

Enums

M3EMenuAnchorPosition
Preferred placement of a menu relative to its anchor.
M3EMenuColorStyle
Standard vs vibrant container color mapping for M3EMenu.
M3EMenuItemShape
Per-item corner shape within a menu group (Compose MenuDefaults.itemShape).

Extensions

M3EMenuSpringMotion on M3ESpring
Converts M3ESpring to a motor SpringMotion for menu animations.

Functions

m3eMenuPartitionSurfaces(List<M3EMenuNode> nodes) List<M3EMenuGroup>
Partitions top-level menu nodes into elevated surface groups.
showM3EMenu<T>({required BuildContext context, required Rect anchor, required List<M3EMenuNode> children, M3EMenuAnchorPosition position = M3EMenuAnchorPosition.bottomEnd, M3EMenuColorStyle colorStyle = M3EMenuColorStyle.standard, T? selectedValue, bool closeOnSelect = true, double? preferredWidth, FocusNode? callerFocusNode, M3EMenuTheme? themeOverride}) Future<T?>
Shows an expressive menu popup anchored to anchor.

Typedefs

M3EMenuAnchorBuilder = Widget Function(BuildContext context, VoidCallback open)
Builds the anchor for an M3EMenu, given a callback to open the menu.
M3EMenuOpenSubmenuCallback = void Function(Rect anchorRect, List<M3EMenuNode> children)
Callback to open a cascading submenu from an item rect.
M3EMenuSelectCallback = void Function(Object? value)
Callback when a menu node produces a selection result.