MenuItem class

Data model for a single menu item.

Constructors

Creates a MenuItem.
const
Create a divider menu item.
const

Properties

enabled bool
Whether the item is interactive. Defaults to true.
final
hashCode int
The hash code for this object.
no setterinherited
icon IconData?
Optional icon to display before the label.
final
isDivider bool
Whether this item is a divider.
final
label String
The text label to display.
final
onTap VoidCallback?
Callback when the item is tapped.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
trailing Widget?
Optional widget to display after the label.
final
value String
The unique value associated with this item.
final

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