GlassButtonGroupItem constructor

const GlassButtonGroupItem({
  1. required Widget icon,
  2. VoidCallback? onTap,
  3. String? label,
  4. bool enabled = true,
})

Creates a group item with an icon and optional tap callback.

When onTap is omitted (or null), the item renders passively without outer button semantics, keyboard focus stop, or tap handling, allowing custom child widgets to expose their own semantics and gestures.

Implementation

const GlassButtonGroupItem({
  required this.icon,
  VoidCallback? onTap,
  this.label,
  this.enabled = true,
})  : onTap = onTap ?? _noOp,
      menuItems = null,
      menuAlignment = null,
      menuWidth = 200,
      menuHeight = null;