GlassGroupItem class
A lightweight data class representing a single item in a GlassButtonGroup.
Unlike GlassButton, a GlassGroupItem carries no widget state — no animation controllers, no stretch physics, no glow overlays. The parent GlassButtonGroup provides the glass surface and renders each item as a simple icon with a press-dim highlight.
GlassButtonGroup.icons(
items: [
GlassGroupItem(icon: Icon(CupertinoIcons.bold), onTap: () {}),
GlassGroupItem(icon: Icon(CupertinoIcons.italic), onTap: () {}),
GlassGroupItem(icon: Icon(CupertinoIcons.underline), onTap: () {}),
],
)
Constructors
- GlassGroupItem({required Widget icon, required VoidCallback onTap, String? label, bool enabled = true})
-
Creates a group item with an icon and tap callback.
const
Properties
- enabled → bool
-
Whether the item is interactive.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- icon → Widget
-
The icon widget to display.
final
- label → String?
-
Optional semantic label for accessibility.
final
- onTap → VoidCallback
-
Called when the item is tapped.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited