ShadCommandItem class
A single selectable row in a ShadCommand.
This is a description rather than a widget: the command renders it, so that filtering, highlighting and keyboard navigation stay in one place.
- Annotations
Constructors
-
ShadCommandItem({required String label, VoidCallback? onSelected, Widget? leading, Widget? trailing, List<
String> keywords = const [], bool enabled = true, Object? value}) -
const
Properties
- enabled → bool
-
Whether the item can be chosen.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
keywords
→ List<
String> -
Extra terms the filter should match, for synonyms the label omits.
final
- label → String
-
The text shown for the item, and what the filter matches against.
final
- leading → Widget?
-
An icon shown before the label.
final
- onSelected → VoidCallback?
-
Called when the item is chosen, by click or by Enter.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- searchText → String
-
The haystack the default filter searches.
no setter
- trailing → Widget?
-
Shown at the end of the row, typically a
ShadKbdshortcut hint.final - value → Object?
-
An arbitrary payload, surfaced through ShadCommand.onItemSelected.
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