GlassMenuItem class Modals

One row of a GlassMenuAnchor's menu, kGlassMenuRowHeight tall.

Annotations

Constructors

GlassMenuItem({required String label, Widget? icon, VoidCallback? onPressed, bool isDestructive = false})
A row labelled label, enabled when onPressed is not null.
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
icon → Widget?
Drawn ahead of label, centred 40 px in, in the label colour at 20 px. Null leaves the space empty, so labels stay aligned.
final
isDestructive → bool
Draws the label and icon in iOS's red.
final
label → String
The row's text, on one line and ellipsized when it does not fit.
final
onPressed → VoidCallback?
Null disables it. The menu closes after it runs.
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