desktop_context_menu
0.1.1, released 5 years ago by rows.com
Opens a native context menu at the mouse coordinates on Windows and macOS.
WASM-ready
What it does
A Flutter plugin that spawns a native context menu at the current cursor position on macOS and Windows. Supports items, separators, disabled items, and keyboard shortcuts.
AI-written summary of version 0.1.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You are building a desktop application for macOS or Windows and need native context menus.
- You want to support keyboard shortcuts and item separators within desktop context menus.
Skip it when
- Your application targets mobile web or platforms other than Windows and macOS.
- You require custom-styled Flutter widgets instead of native context menus.
Strengths
- Provides native context menus on macOS and Windows.
- Supports separators and item-specific shortcuts.
- Simple asynchronous usage to capture the selected menu item.
Weaknesses
- Limited to Windows and macOS platforms.
- Very early version (0.1.1).
Setup
- Kind
- Plugin (native code)
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 3
not documented
final selectedItem = await showContextMenu(menuItems: [
ContextMenuItem(
title: 'Menu item title',
onTap: () {
// do something...
},
),
ContextMenuSeparator(),
]);Alternatives
Packages that do the same job and could replace desktop_context_menu.
- disable_web_context_menu
Disables the native web context menu for a specific Flutter widget
44Compare