context_menu_android 1.0.6 copy "context_menu_android: ^1.0.6" to clipboard
context_menu_android: ^1.0.6 copied to clipboard

iOS-style context menu widget for Flutter with blur, smooth animations, and nested sub-menus; optimized for Android.

Changelog #

1.0.6 - 2025-12-05 #

๐Ÿ›  Bug fixes & Quality Improvements #

  • ๐Ÿ› Fixed layout overflow in nested submenus when used inside constrained parents (e.g., Row/Column) by improving parent-data checks and enforcing proper Flexible placement.
  • ๐Ÿงฉ Resolved animation stutter caused by simultaneous childController / menuController conflicts โ€” added improved sequencing and cancellation logic.
  • โœ… Guarded navigation pops with extra mounted checks to prevent exceptions when widget tree is being disposed.
  • ๐Ÿ”’ Stabilized internal state updates to avoid duplicate callbacks on fast successive taps.

โœจ New Features #

  • ๐Ÿ”€ New parameter: menuAlignment
    • Adds flexible control over menu alignment and opening direction (e.g., left, right, center, start, end).
    • Works with screen-edge detection to flip direction automatically when needed.
    • Example: ContextMenuAndroid(menuAlignment: MenuAlignment.right) to force right alignment.

๐Ÿš€ UX & Animation #

  • ๐ŸŽž Improved close animation timing to better match opening velocity (smoother reverse transitions).
  • โ†”๏ธ Enhanced submenu slide transitions to better respect menuAlignment and RTL layouts.
  • โœจ Slightly increased backdrop blur radius with adaptive opacity for clearer readability in bright/dark backgrounds.

๐Ÿงญ API & Developer Experience #

  • ๐ŸŽฏ Updated minimum Dart SDK requirement to ^3.10.1 for improved performance, language features, and compatibility.

  • ๐Ÿงฐ Added MenuAlignment enum to public API with clear docs and examples.

  • ๐Ÿงพ Updated example app showing menuAlignment usage and RTL support example.

  • ๐Ÿงช Added additional unit tests around submenu stack restoration and alignment flipping.

๐Ÿงน Code Maintenance #

  • ๐Ÿ” Refactored getResponsiveSize() to centralize min/max clamps for consistent behavior across versions.
  • ๐Ÿงผ Removed deprecated internal helpers and improved doc comments (Arabic + English).
  • ๐Ÿ“ฆ Minor dependency bumps and lint fixes.

1.0.5 - 2025-11-05 #

๐Ÿš€ Major Improvements #

๐Ÿงฉ Animation & Performance Enhancements

  • โš™๏ธ Optimized animation lifecycle โ€” old AnimationController instances are now properly disposed to prevent memory leaks.
  • ๐Ÿ•’ Adjusted animation duration dynamically (min(600, 80 * length)) for smoother scaling on long action lists.
  • ๐Ÿ” Added reverse closing animation when dismissing the menu for a more natural experience.
  • ๐Ÿง  Improved animation sequencing between childController and menuController for iOS-like smooth transitions.

๐Ÿงญ Submenu UX Improvements

  • โž• Added visual arrow indicator (chevron_right) for items that contain submenus.
  • ๐Ÿ”™ Enhanced back-navigation with animated slide transitions and proper stack restoration.

๐ŸŽจ UI / Layout Refinements

  • ๐ŸชŸ Added SafeArea to protect against notch and gesture areas.
  • ๐Ÿงฑ Wrapped long menus in SingleChildScrollView with Flexible to prevent overflow on small devices.
  • ๐Ÿ’ก Improved background blur with a subtle dark overlay (Colors.black.withOpacity(0.15)) for better contrast.
  • โš–๏ธ Refined menu width and padding using responsive scaling.

๐Ÿงฎ Responsive Design Enhancements

  • ๐Ÿ“ Improved getResponsiveSize() โ€” now clamps width between 320.0 and 600.0 for better tablet support.
  • ๐Ÿ“ฑ Ensures consistent sizing across all devices, maintaining proportional text and padding.

๐Ÿงฐ Codebase Cleanup & Reliability

  • โœ… Added defensive checks for mounted state before popping navigation.
  • ๐Ÿงผ Refactored logic to make the widget production-stable for large projects.
  • ๐Ÿ“„ Preserved all inline documentation and bilingual comments for clarity.

1.0.4 - 2025-07-22 #

๐Ÿ†• Features #

๐Ÿ” SubMenu Support

  • โœ… Added support for nested subMenu items in context menu.
  • ๐Ÿ“ฑ Submenus open with iOS-style sliding animation.
  • ๐Ÿ”™ Includes automatic "Back" button and navigation stack handling.
  • ๐ŸŽฏ Fully animated using AnimatedSwitcher with slide transitions.
  • ๐Ÿ“ฆ Seamless integration with existing ContextMenuAndroid actions.

1.0.3 - 2025-07-18 #

๐ŸŽฏ Enhancements #

๐Ÿ“ Responsive Sizing Added

  • โœ… New textSize and iconSize properties allow for per-device scaling.
  • โœ… Sizes are automatically adjusted using getResponsiveSize() to match screen width for consistent appearance across devices.

๐Ÿง  Smarter Style Composition

  • โœจ Introduced getTextStyle() helper to merge user-defined textStyle with fallback logic and responsive sizing.
  • โœจ Introduced getIconColor() for consistent icon coloring logic (including automatic detection of delete actions).

๐Ÿงพ Internal Improvements

  • ๐Ÿ’ฌ Added inline documentation and bilingual comments (Arabic + English) for better clarity and future maintenance.
  • ๐Ÿ“ฆ Padding is now responsive by default using getResponsiveSize() (e.g., horizontal padding 16 โ†’ getResponsiveSize(16)).

1.0.2 - 2025-07-17 #

โœ… Fixes & Improvements #

  • ๐Ÿงผ API Refactor: iOSStyleContextMenu is now a stateless functional widget for cleaner syntax.
  • ๐Ÿ” Smooth Transitions: Replaced StatefulWidget with AnimatedScale for animation.
  • โš™๏ธ Action Builder Optimization: Utilized List.generate() to streamline context menu actions.
  • ๐ŸŽจ Customization Enhancements:
    • backgroundColor
    • dividerColor
    • iconColor
    • textStyle
    • contentPadding
  • ๐Ÿ—‘ Smart Delete Detection: Automatically highlights delete actions with red, bold text.
  • ๐Ÿงช Testing: Added unit tests using flutter_test.
  • ๐Ÿ“š Documentation: Improved inline comments and updated the example app to reflect new features.

1.0.1 - 2025-07-17 #

๐ŸŽ‰ Initial release of ContextMenuAndroid โ€” an iOS-style context menu for Android built using Flutter.

โœจ Features #

  • iOS-style blurred context menu.
  • Customizable actions with icons, labels, and colors.
  • Smart delete detection.
  • Dark mode support.
  • Smooth and responsive UI animations.
  • Easily embeddable in any widget.

๐Ÿ›  Technical Improvements #

  • โœ… Enabled full null safety.
  • โœ… Optimized with const constructors for performance.
  • โœ… Enforced strong linter rules via analysis_options.yaml.
  • โœ… Refactored code for readability and reusability.
  • โœ… Included preview image hosted on GitHub for pub.flutter-io.cn display.

0.0.1 - 2025-07-16 #

  • ๐Ÿงช First draft release of ContextMenuAndroid package.
  • ๐ŸŽจ Basic iOS-style blurred context menu implementation.
  • ๐Ÿงฉ Supports customizable icons, labels, and actions.
  • ๐ŸŽฌ Initial animation, shadow, and structure setup.
8
likes
150
points
159
downloads
screenshot

Publisher

unverified uploader

Weekly Downloads

iOS-style context menu widget for Flutter with blur, smooth animations, and nested sub-menus; optimized for Android.

Repository (GitHub)
View/report issues

Topics

#context-menu #ios #android #ui #widget

Documentation

API reference

License

unknown (license)

Dependencies

flutter

More

Packages that depend on context_menu_android