GlassTabBarExtraButton.menu constructor

const GlassTabBarExtraButton.menu({
  1. required Widget icon,
  2. required List<Widget> menuItems,
  3. required String label,
  4. Color? iconColor,
  5. double size = 64,
  6. GlassExtraButtonPlacement placement = GlassExtraButtonPlacement.right,
  7. GlassExtraButtonPosition position = GlassExtraButtonPosition.beforeSearch,
  8. bool collapseOnSearchFocus = true,
  9. bool enabled = true,
  10. GlassMenuAlignment? menuAlignment,
  11. double menuWidth = 200,
})

Opens a GlassMenu pull-down when the extra button is tapped.

The button morphs into the menu — the same liquid-spring behavior as GlassButtonGroupItem.menu and GlassBarItem.menu. Equivalent to a UIBarButtonItem(image:menu:) placed in a toolbar or tab bar.

menuItems accepts GlassMenuItem and GlassMenuDivider widgets — the same contract as GlassMenu.items.

menuAlignment defaults to auto-detection, which for a bottom-of-screen button always expands upward.

Implementation

const GlassTabBarExtraButton.menu({
  required this.icon,
  required List<Widget> this.menuItems,
  required this.label,
  this.iconColor,
  this.size = 64,
  this.placement = GlassExtraButtonPlacement.right,
  this.position = GlassExtraButtonPosition.beforeSearch,
  this.collapseOnSearchFocus = true,
  this.enabled = true,
  this.menuAlignment,
  this.menuWidth = 200,
}) : onTap = _noOp;