command_palette library

Classes

CommandPalette
Command palette is a widget that is summoned by a keyboard shortcut, or by programmatic means.
CommandPaletteAction
Action that is presented in the command palette. These are the things the user will be presented with to choose from
CommandPaletteConfig
Configuration options for the command palette
CommandPaletteStyle
Used to style a CommandPalette
Filter
Collection of various String based filters. Everything in here is an adaptation of the filtering library used in VSCode
FilterMatch
A match for a given String. Has the start and end indices of the substring containing the match
KeyboardKeyIcon
Creates an icon which represents a keyboard key. This is done either with existing IconData which represents the key, or with a String
MatchedCommandPaletteAction
An action that was matched to the entered query. Contains both the action itself and a list of the matches contained within

Enums

CommandPaletteActionType
The different type of command palette

Typedefs

ActionBuilder = Widget Function(BuildContext context, CommandPaletteStyle style, CommandPaletteAction action, bool isHighlighted, VoidCallback onSelected, List<String> searchTerms)
Builder used for the action options. Provides the following arguments:
ActionFilter = List<CommandPaletteAction> Function(String query, List<CommandPaletteAction> allActions)
Defines the type of function to be used for filtering command palette actions. Given query and allActions, the function should determine the subset of actions to return based on the function
FilterFunction = List<FilterMatch>? Function(String word, String wordToMatchAgainst)
filter functions return either a list of matches, or null if nothing was found