PrismCommand class

One command shown in a PrismCommandPalette.

Annotations

Constructors

PrismCommand({required String label, required VoidCallback onSelect, String? id, String? subtitle, IconData? icon, String group = 'General', String? shortcut, List<String> keywords = const [], bool enabled = true, Widget? trailing})
Creates a command.
const

Properties

enabled → bool
Whether the command can be chosen.
final
group → String
Section header this command is grouped under.
final
hashCode → int
The hash code for this object.
no setterinherited
icon → IconData?
Leading icon.
final
id → String?
Stable identifier, useful for tests and recent-command tracking.
final
keywords → List<String>
Extra search terms that should match this command.
final
label → String
Primary label shown in the list.
final
onSelect → VoidCallback
Runs when the command is chosen.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
searchText → String
Everything searchable about this command, lowercased.
no setter
shortcut → String?
Shortcut hint rendered on the right (e.g. ⌘S).
final
subtitle → String?
Secondary description.
final
trailing → Widget?
Widget rendered at the trailing edge, after 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