GlassButtonGroupItem.menu constructor

const GlassButtonGroupItem.menu({
  1. required Widget icon,
  2. required List<Widget> menuItems,
  3. GlassMenuAlignment? menuAlignment,
  4. double menuWidth = 200,
  5. String? label,
})

Creates a group item that opens a GlassMenu pull-down when tapped.

This is the Flutter equivalent of UIBarButtonItem.menu inside a UIBarButtonItemGroup — the standard iOS 26 pattern for toolbar buttons that reveal a list of actions.

menuItems accepts both GlassMenuItem and GlassMenuDivider widgets, matching the GlassMenu.items contract directly.

menuAlignment controls where the menu expands relative to the trigger. Defaults to auto-detection based on screen position.

menuWidth is the width of the expanded menu panel. Defaults to 200.

Implementation

const GlassButtonGroupItem.menu({
  required this.icon,
  required List<Widget> this.menuItems,
  this.menuAlignment,
  this.menuWidth = 200,
  this.label,
})  : onTap = _noOp,
      enabled = true;