command_palette
0.7.6, released 2 years ago by tylernorbury.com
A Flutter widget that shows a command palette similar to VS Code or Slack.
What it does
It lets users trigger actions via a keyboard shortcut or programmatically. The palette supports nested actions, custom filtering, and optional keyboardless access.
AI-written summary of version 0.7.6, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need a quick, global command interface in a Flutter app
- You want to expose many actions without cluttering the UI
- You need keyboard shortcuts on desktop or web
Skip it when
- You only need a single action or simple button
- You are building a non‑Flutter platform
- You require heavy custom styling beyond the provided builder
Strengths
- Easy to integrate with a single widget
- Supports nested actions and custom filtering
- Keyboard shortcut support out of the box
- Cross‑platform (Android, iOS, web, desktop)
Weaknesses
- Not yet 1.0.0, may change API
- Limited styling customization without writing a custom builder
- No built‑in theming beyond defaults
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 2
Add dependency in pubspec and place CommandPalette widget in the tree
CommandPalette(
actions: [
CommandPaletteAction(
label: "Goto Home Page",
actionType: CommandPaletteActionType.single,
onSelect: () => Navigator.of(context).pushNamed('/home'),
),
],
child: Text("Press Ctrl+P to open"),
)Alternatives
Packages that do the same job and could replace command_palette.
- keymap
Keyboard shortcuts widget with help overlay and markdown support
50Compare - keyboard_visibility_pro
Detects soft-keyboard open and close status in Flutter applications.
39Compare - numeric_keyboard
A simple numeric keyboard widget for Flutter.
50Compare - onscreen_num_keyboard
A simple on‑screen numeric keyboard widget for Flutter.
44Compare
Works with
Packages commonly used together with command_palette: ones it builds on, ones built on it, and its own family.