CommandItem class

An individual action or search item in a CommandPalette.

Constructors

CommandItem({required String title, String? subtitle, IconData? icon, String category = 'General', String? shortcut, String? badge, Color? badgeColor, VoidCallback? onSelected})
const

Properties

badge → String?
Optional badge text (e.g. "New", "Pro").
final
badgeColor → Color?
Custom badge color.
final
category → String
Group category (e.g. "Navigation", "Actions", "Settings").
final
hashCode → int
The hash code for this object.
no setterinherited
icon → IconData?
Leading icon.
final
onSelected → VoidCallback?
Callback executed when this item is selected.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
shortcut → String?
Optional keyboard shortcut label (e.g. "Ctrl+N", "⌘P").
final
subtitle → String?
Optional subtitle or helper text.
final
title → String
Action title.
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