HuxCommandShortcuts class
A utility class for handling keyboard shortcuts for the command palette
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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
Static Methods
-
handleKeyEvent(
{required BuildContext context, required List< HuxCommandItem> commands, String placeholder = 'Type a command or search...', String emptyText = 'No commands found', ValueChanged<HuxCommandItem> ? onCommandSelected, VoidCallback? onClose}) → void Function(KeyEvent) - Sets up a keyboard listener for CMD+K (or Ctrl+K) to open the command palette
-
wrapper(
{required List< HuxCommandItem> commands, required Widget child, String placeholder = 'Type a command or search...', String emptyText = 'No commands found', ValueChanged<HuxCommandItem> ? onCommandSelected, VoidCallback? onClose}) → Widget - A simple widget that wraps your app and provides command palette shortcuts