flutter_root_context_menu 0.10.1
flutter_root_context_menu: ^0.10.1 copied to clipboard
A customizable context menu package for Flutter with animation support, flexible styling, and web-like behavior.
0.10.1 #
- fix: Add explicit
mouseCursorto menu items —SystemMouseCursors.clickfor enabled items,SystemMouseCursors.forbiddenfor disabled. Required after Flutter updates whereGestureDetectorno longer implicitly switches the cursor on hover.
0.10.0 #
- BREAKING: Remove implicit
Opacitywrappers on menu item icons and the default submenu chevron. Previously, disabled items dimmed the icon to0.4and the default chevron to0.3/0.6. Icons are now rendered as-is regardless ofenabled. Policy: the library styles only what it renders (text, default chevron); user-provided widgets are rendered unchanged. If you want icons to reflect the disabled state, build the icon widget accordingly at call-site (e.g.Icon(Icons.cut, color: Colors.grey)). - feat: Add
disabledTextStyletoContextMenuConfigfor customizing the text style of disabled menu items. ReplacestextStyleand ignoresContextMenuItem.textColorwhen set. Falls back totextStyle.copyWith(color: Colors.grey)whennull. - example: Add Disabled State section to the playground control panel and sample disabled items (standard + submenu) to the demo menu.
0.9.0 #
- feat: Add optional
titleparameter toshowRootContextMenu()for displaying a header label at the top of the root menu (useful for distinguishing context menus from different sources) - feat: Add
titleStyleandtitlePaddingtoContextMenuConfigfor customizing title appearance - example: Add Menu Title section to the playground control panel (toggle + text field)
0.8.0 #
- BREAKING: Extract submenu options from
ContextMenuConfiginto newSubmenuConfigclasssubmenuOpenDelay→submenu.openDelaysubmenuCloseDelay→submenu.closeDelaysubmenuHorizontalOffset→submenu.horizontalOffsetsubmenuAnimationBuilder→submenu.animationBuildersubmenuAnimationDuration→submenu.animationDurationmaxSubmenuDepth→submenu.maxDepth
- feat: Add
SubmenuConfig.iconfor customizing the submenu trailing icon (default:Icons.chevron_right) - feat: Add
SubmenuConfig.copyWith()for ergonomic single-field updates - fix: Custom submenu icon no longer has forced
Opacitywrapper — rendered as-is for full styling control
0.7.0 #
- feat: Add
ContextMenuItem.submenu()for nested submenu support with unlimited depth - feat: Submenus open on hover (desktop) and tap (touch) with configurable delays
- feat: Smart submenu positioning with automatic left/right flip on screen edge overflow
- feat: Add
submenuOpenDelay,submenuCloseDelay,submenuHorizontalOffsetconfig options - feat: Add
submenuAnimationBuilderandsubmenuAnimationDurationfor independent submenu animation control - feat: Add
maxSubmenuDepthconfig to limit nesting depth - feat: Add
ContextMenuAnimations.slideLeftanimation for left-opening submenus - feat: Auto-select slideRight/slideLeft animation based on submenu open direction
- refactor: Restructure overlay into
ContextMenuRoot+_ContextMenuPanelarchitecture - example: Add submenu playground controls (animation, delays, offset, max depth)
- example: Add Share (2-level nested) and Export As submenu demo items
0.6.1 #
- fix: Use post-frame measurement for accurate menu positioning with custom widget items
- refactor: Replace pre-calculated menu size with actual rendered size measurement via
GlobalKey - example: Add volume slider and theme color palette custom menu items
0.6.0 #
- feat: Add
ContextMenuItem.custom()for rendering custom widgets inside menu items - feat: Custom items support interactive widgets like
Switch,Checkbox,Sliderwithout auto-closing the menu - feat: Add
customHeightparameter for custom items to override default item height - refactor: Restructure example app with separation of concerns (models, pages, widgets folders)
0.5.1 #
- feat: Add
closeRootContextMenu()helper function for explicitly closing menus - feat: Add
isRootContextMenuOpen()helper function to check if a menu is currently open - docs: Add manual control examples to README with new helper functions
0.5.0 #
- fix: Allow click events to pass through to underlying widgets when menu is open - clicking outside the menu now closes it AND triggers the clicked widget in a single action
0.4.3 #
- fix: Support async callbacks in onTap to prevent UI blocking when menu items execute asynchronous operations
- fix: Execute onTap callbacks in microtask to avoid blocking the event loop during heavy synchronous operations
- fix: Improve menu closing behavior - clicking outside the menu now closes it immediately without delay
0.4.2 #
- fix: Fix menu item onTap callback and prevent new menu from being immediately closed
0.4.1 #
- fix: Fix menu item onTap callback not being triggered due to pointer event handling
0.4.0 #
- BREAKING: Rename
showContextMenutoshowRootContextMenuto avoid naming conflicts - feat: Add
boxShadowparameter toContextMenuConfigfor custom shadow styling - feat: Add playground controls for customizing box shadow (blur, spread, offset, opacity, color)
- fix: Ensure Material widget is present when using custom boxShadow to prevent InkWell errors
0.3.1 #
- feat: Add
builderparameter toContextMenuAreafor correct context handling - feat: Add
iconWidthandiconSpacingconfig options for precise icon sizing - fix: Menu width calculation now uses actual content width instead of always using maxWidth
- docs: Add
ContextMenuAreaand disabled items documentation to README
0.3.0 #
- feat: Add
itemBorderRadiusfor rounded corners on menu item hover backgrounds - feat: Add
itemMarginfor spacing around individual menu items - feat: Add
dividerMarginfor vertical spacing around dividers - feat: Add
menuPaddingfor padding inside menu container - feat: Add playground controls for all new styling options
- fix: Improve menu size calculation to include all margins and paddings
0.2.0 #
- feat: Add
screenPaddingparameter to control minimum distance from screen edges - feat: Add playground controls for adjusting screen padding in real-time
0.1.0 #
Initial release with core features:
- Manual trigger context menu with
showRootContextMenu() - Flexible icon support (Material Icons, SVG, custom widgets)
- 8 built-in animations + custom animation support
- Customizable styling (colors, sizes, elevation, border radius)
- Adjustable menu width (minWidth, maxWidth)
- Web-like click behavior (single click closes menu and triggers action)
- Automatic overflow prevention
- Interactive example playground