ShortcutSerialization class

A class used by MenuSerializableShortcut to describe the shortcut for serialization to send to the platform for rendering a PlatformMenuBar.

See also:

Constructors

ShortcutSerialization.character(String character, {bool alt = false, bool control = false, bool meta = false})
Creates a ShortcutSerialization representing a single character.
ShortcutSerialization.modifier(LogicalKeyboardKey trigger, {bool alt = false, bool control = false, bool meta = false, bool shift = false})
Creates a ShortcutSerialization representing a specific LogicalKeyboardKey and modifiers.

Properties

alt bool?
If this shortcut has a trigger, this indicates whether or not the alt modifier needs to be down or not.
no setter
character String?
The character that triggers this shortcut, if any.
no setter
control bool?
If this shortcut has a trigger, this indicates whether or not the control modifier needs to be down or not.
no setter
hashCode int
The hash code for this object.
no setterinherited
meta bool?
If this shortcut has a trigger, this indicates whether or not the meta (also known as the Windows or Command key) modifier needs to be down or not.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shift bool?
If this shortcut has a trigger, this indicates whether or not the shift modifier needs to be down or not.
no setter
trigger LogicalKeyboardKey?
The keyboard key that triggers this shortcut, if any.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toChannelRepresentation() Map<String, Object?>
Converts the internal representation to the format needed for a PlatformMenuItem to include it in its serialized form for sending to the platform.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited