context_menu_android 1.0.5
context_menu_android: ^1.0.5 copied to clipboard
iOS-style context menu widget for Flutter with blur, smooth animations, and nested sub-menus; optimized for Android.
Changelog #
1.0.5 - 2025-11-05 #
๐ Major Improvements #
๐งฉ Animation & Performance Enhancements
- โ๏ธ Optimized animation lifecycle โ old
AnimationControllerinstances 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
childControllerandmenuControllerfor 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
SingleChildScrollViewwithFlexibleto 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 between320.0and600.0for 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
subMenuitems in context menu. - ๐ฑ Submenus open with iOS-style sliding animation.
- ๐ Includes automatic "Back" button and navigation stack handling.
- ๐ฏ Fully animated using
AnimatedSwitcherwith slide transitions. - ๐ฆ Seamless integration with existing
ContextMenuAndroidactions.
1.0.3 - 2025-07-18 #
๐ฏ Enhancements #
๐ Responsive Sizing Added
- โ
New
textSizeandiconSizeproperties 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-definedtextStylewith 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 padding16 โ getResponsiveSize(16)).
1.0.2 - 2025-07-17 #
โ Fixes & Improvements #
- ๐งผ API Refactor:
iOSStyleContextMenuis now a stateless functional widget for cleaner syntax. - ๐ Smooth Transitions: Replaced
StatefulWidgetwithAnimatedScalefor animation. - โ๏ธ Action Builder Optimization: Utilized
List.generate()to streamline context menu actions. - ๐จ Customization Enhancements:
backgroundColordividerColoriconColortextStylecontentPadding
- ๐ 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
constconstructors for performance. - โ
Enforced strong linter rules via
analysis_options.yaml. - โ Refactored code for readability and reusability.
- โ
Included preview image hosted on GitHub for
pub.devdisplay.
0.0.1 - 2025-07-16 #
- ๐งช First draft release of
ContextMenuAndroidpackage. - ๐จ Basic iOS-style blurred context menu implementation.
- ๐งฉ Supports customizable icons, labels, and actions.
- ๐ฌ Initial animation, shadow, and structure setup.
