GlassTabBarTrailingButton.menu constructor

const GlassTabBarTrailingButton.menu({
  1. required Widget icon,
  2. required List<Widget> menuItems,
  3. String? label,
  4. bool enabled = true,
  5. GlassMenuAlignment? menuAlignment,
  6. double menuWidth = 200,
  7. double? menuHeight,
})

Opens a GlassMenu pull-down when the trailing pill is tapped.

The whole pill morphs into the menu — the same liquid-spring behavior as GlassButtonGroupItem.menu and GlassBarItem.menu. Equivalent to a UIBarButtonItem(image:menu:) placed in the tab bar's trailing slot.

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 — pass GlassMenuAlignment.topLeft or GlassMenuAlignment.topRight to pin the direction explicitly.

Implementation

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