GlassMenuItem class
A row of a GlassMenu.
- Inheritance
-
- Object
- GlassMenuEntry
- GlassMenuItem
Constructors
- GlassMenuItem.new({required Widget label, Widget? icon, VoidCallback? onSelected, bool destructive = false, bool enabled = true})
-
Creates a menu row;
onSelectedruns when it's chosen.const
Properties
- destructive → bool
-
Marks an action that deletes or can't be undone, in red.
final
- enabled → bool
-
Whether the row can be chosen; false greys it out.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- icon → Widget?
-
Shown before the label, at 16px.
final
- label → Widget
-
The row's text.
final
- onSelected → VoidCallback?
-
Called when the row is chosen. Null disables it.
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