GameShortcut class

A shortcut in a GameShortcuts widget.

Constructors

GameShortcut({required String title, required GameShortcutsShortcut shortcut, ContextCallback? onStart, ContextCallback? onStop, bool controlKey = false, bool metaKey = false, bool altKey = false, bool shiftKey = false})
Create an instance.
const
GameShortcut.withControlKey({required String title, required GameShortcutsShortcut shortcut, ContextCallback? onStart, ContextCallback? onStop, bool altKey = false, bool shiftKey = false})
Create an instance with controlKey or metaKey equal to true, depending on which platform we are running on.

Properties

altKey → bool
Whether the alt key must be used to trigger this shortcut.
final
controlKey → bool
Whether the control key must be used to trigger this shortcut.
final
hashCode → int
The hash code for this object.
no setterinherited
metaKey → bool
Whether the meta key must be used to trigger this shortcut.
final
onStart → ContextCallback?
The function to call when this key is activated.
final
onStop → ContextCallback?
The function to call when this key is deactivated.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
shiftKey → bool
Whether the shift key must be used to trigger this shortcut.
final
shortcut → GameShortcutsShortcut
The physical key which will activate this shortcut.
final
title → String
The title of this shortcut.
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