ExpressiveMenuItem class

An action (Compose's DropdownMenuItem with a shape): a tap closes the menu, then runs onPressed. Disabled when onPressed is null.

Inheritance

Constructors

ExpressiveMenuItem(String label, {ExpressiveComponentThemeData? style, VoidCallback? onPressed, IconData? icon, String? supportingText, String? trailingText, IconData? trailingIcon})
An action labelled label that runs onPressed.
const

Properties

enabled → bool
Whether it takes input: false when onPressed is null, as in Flutter.
no setter
hashCode → int
The hash code for this object.
no setterinherited
icon → IconData?
A leading glyph.
final
label → String
The label.
final
onPressed → VoidCallback?
What a tap does, after the menu closes.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
style → ExpressiveComponentThemeData?
Stateful visual overrides for this menu row.
finalinherited
supportingText → String?
A second line under the label.
final
trailingIcon → IconData?
A trailing glyph (ignored when trailingText is set).
final
trailingText → String?
Trailing text: a keyboard shortcut (MenuDefaults .DropdownMenuItemTrailingLabel).
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