DesignMenuEntry class

An item of a menubar: a command, a submenu (children), or a divider.

Annotations

Constructors

DesignMenuEntry({required String label, VoidCallback? onPressed, List<DesignMenuEntry>? children, String? shortcut, bool? checked, Object? data})
An item labelled, that onPressed runs, or a submenu of children. A command with no onPressed is disabled, as a Flutter menu item is.
const
DesignMenuEntry.divider()
A line between groups of items.
const

Properties

checked → bool?
Its check, for an item that toggles; null: none.
final
children → List<DesignMenuEntry>?
Its submenu's items; null: it is a command.
final
data → Object?
Anything the look needs to paint it (an icon).
final
divider → bool
Whether it is a divider.
final
enabled → bool
Whether it can be pressed: a command with onPressed, or a submenu with children.
no setter
hashCode → int
The hash code for this object.
no setterinherited
isSubmenu → bool
Whether it opens a submenu.
no setter
label → String
Its name.
final
onPressed → VoidCallback?
Runs it, after its menus closed.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
shortcut → String?
Its key, for the look to show ("Ctrl+S"). designShortcutLabel spells a SingleActivator as the platform's own menus do ("⌘ S" on macOS).
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