anchored_sheets
A Flutter package to create anchored sheets that can be dragged and snapped to different positions on the screen.
1.2.23
FauziFuzzy/anchored_sheets
What this package is like to depend on
Last release 11 months ago
14 Sep 2025
Ships on a steady schedule
a new release about every 9 days
Nearly every release is documented
notes for 26 of 28 stable releases
Nothing withdrawn
no release was ever pulled
1 years old
28 releases · first in 2025
13 releases in the last 12 months
see the full history below
Release timeline
28 releases · Aug 2025 to Sep 2025Releases
latest 28-
1.2.2314 Sep 2025 -
1.2.2213 Sep 2025 -
1.2.2111 Sep 2025 -
1.2.2011 Sep 2025 -
1.2.1910 Sep 2025 -
1.2.1809 Sep 2025 -
1.2.1708 Sep 2025 -
1.2.1607 Sep 2025 -
1.2.1506 Sep 2025Release notes
Open source →- Fix issue where if user back on screen then reselect again button
- Added AnchoredRouteObserver it need to add on navigatorsObserver to handle dismisible.
-
1.2.1405 Sep 2025Release notes
Open source →- Create class to simplify repetitive properties on popAnchoreAndNavigate.
-
1.2.1304 Sep 2025 -
1.2.1201 Sep 2025Release notes
Open source →- Added navigation for different routes.
- Fixed issue dissmiss anchored, navigated and reopen anchored.
- Added logger instead of debugPrint
-
1.2.1129 Aug 2025 -
1.2.1029 Aug 2025Release notes
Open source →- Fixed issue mainAxisSize.min where if
isScrollControlled: falseand nomainAxisSize:mainAxisSize.minshould return default height. - Add more safety checking if animation and controller is dismissed.
- Add proper handling on preventing memory leaks with check mounting.
- Fixed issue mainAxisSize.min where if
-
1.2.927 Aug 2025 -
1.2.827 Aug 2025Release notes
Open source →- Added InheritedTheme.captureAll() to bridge context
- Remove toggleduplicate, dismissothermodal and replacesheet optional and make it automatically.
-
1.2.726 Aug 2025Release notes
Open source →- Added new navigation context.popAnchorAndNavigate()
- Added new navigation context.navigateAndReopenAnchor()
- Update readme.md
-
1.2.625 Aug 2025 -
1.2.525 Aug 2025Release notes
Open source →- Fixed extra space on drag handle
- Removed gap anchoredsheet with statusbar.
-
1.2.424 Aug 2025 -
1.2.324 Aug 2025Release notes
Open source →- Checks if stacked anchoredsheet
- Added LIFO method to dismissed top stacked anchored.
-
1.2.223 Aug 2025 -
1.2.123 Aug 2025Release notes
Open source →- Optimize lifecycle automatically controller, modal_manager, sheet_state.
- Use flutter lifecycle for memory optimization.
- Mainly focus on anchoredSheet instead of others.
- Fixed issue where safeArea bottom.
- Fixed typo
-
1.2.022 Aug 2025Release notes
Open source →🚫 Added - Smart Duplicate Prevention
- Anchor-based Intelligence: Automatically prevents duplicate sheets using existing
anchorKeyparameter - Zero Configuration: Works without requiring manual sheet IDs or additional setup
- Smart Toggle Behavior: Same anchor key dismisses current sheet, different anchor key replaces it
- Backward Compatible: Existing code works unchanged with new intelligent behavior
🔄 Added - Automatic Sheet Replacement
- Default Replacement:
replaceSheet = trueby default for seamless user experience - Optimized Timing: Reduced transition delay to 16ms for smoother animations
- Context Safety: Added automatic
context.mountedchecks to prevent memory leaks - Graceful Transitions: Smooth dismissal and re-opening with proper state management
🎛️ Added - Enhanced Modal Management
- Multi-Modal Support: New
dismissOtherModalsparameter for comprehensive modal handling - Bottom Sheet Integration: Seamlessly dismisses existing bottom sheets before showing anchored sheets
- Dialog Compatibility: Properly handles alert dialogs and custom dialogs
- Smart Coexistence: SnackBars and material banners can coexist when appropriate
🚀 Fixed - Status Bar Animation Performance
- Eliminated Delay: Fixed visual delay between status bar background and sheet content during animations
- Unified Rendering: Implemented single Material container for synchronized status bar and content rendering
- Optimized Timing: Reduced all animation delays from 50-200ms to 16ms (single frame timing at 60fps)
- Smooth Transitions: Enhanced animation responsiveness from 250ms/200ms to 220ms/180ms for enter/exit
- Better Performance: Eliminated multiple small delays that accumulated to create noticeable lag
🏗️ Enhanced - Architecture Improvements
- Anchor Key Tracking: New controller system tracks current anchor keys for intelligent comparison
- Enhanced Controller Management: Added
getCurrentAnchorKey()and improvedsetCurrentController()with anchor tracking - Memory Optimization: Automatic cleanup of anchor key references when sheets are dismissed
- Type Safety: Improved generic type handling for better compile-time safety
🔧 Enhanced - Developer Experience
- Cleaner API: New features work automatically without requiring API changes
- Better Error Handling: Enhanced debugging information for development
- Performance Optimized: Faster sheet transitions and reduced memory footprint
- Example App: Updated comprehensive demo showcasing all new features
Technical Details
- Added
_currentAnchorKeytracking inanchored_controller.dart - Enhanced
setCurrentController()to accept optionalGlobalKeyparameter - Implemented intelligent duplicate detection based on anchor key comparison
- Optimized animation timing for better perceived performance
- Added comprehensive modal dismissal management via
AnchoredSheetModalManager
Migration Guide
No breaking changes - existing code continues to work. New features are enabled by default:
replaceSheet: true- Automatic sheet replacement (was default false)- Smart duplicate prevention works automatically with existing
anchorKeyusage dismissOtherModals: false- Opt-in modal management when needed
- Anchor-based Intelligence: Automatically prevents duplicate sheets using existing
-
1.1.222 Aug 2025Release notes
Open source →Changed
- BREAKING CHANGE: Updated dismissal API to prioritize context-based approach
context.popAnchorSheet()is now the primary recommended method for dismissing sheetsdismissAnchoredSheet()is kept for backward compatibility but no longer preferred- Updated all examples and documentation to use the new pattern
- Improved fallback handling for dismissal methods
Updated
- All example code now uses
context.popAnchorSheet() - Documentation updated to reflect the preferred dismissal approach
- Test files updated to use the new API
- BREAKING CHANGE: Updated dismissal API to prioritize context-based approach
-
1.1.122 Aug 2025Nothing published for this version
-
1.1.022 Aug 2025Nothing published for this version
-
1.0.022 Aug 2025Release notes
Open source →Added
- 🎯 Anchor positioning - Attach modal sheets to specific widgets using GlobalKeys
- 📏 Height control - Automatic sizing with overflow constraints like showModalBottomSheet
- 🎨 Customizable styling - Full theming support with Material Design integration
- 👆 Drag to dismiss - Optional drag handles and gesture support with configurable thresholds
- 🔄 Return values - Get data back when modal is dismissed
- 📱 Safe area support - Intelligent status bar handling and device-specific layouts
- ⚡ Context-free dismissal - Close modals from anywhere in your code
- 🎭 Animation control - Customizable slide and fade animations with duration settings
- 🔧 Constraint-based architecture - Flexible sizing with BoxConstraints support
- 🌟 Status bar intelligence - Automatic background extension when sheets overlap system UI
- 🎪 Multiple configuration options - isDismissible, enableDrag, useSafeArea, and more
Features
-
Core Functions:
anchoredSheet()- Main function to show modal sheetscontext.popAnchorSheet()- Context-free dismissal functiondismissAnchoredSheetWithContext()- Context-aware dismissal function
-
Positioning Options:
- Anchor to specific widgets using GlobalKey
- Custom top offset positioning
- Automatic safe area detection and handling
-
Styling & Theming:
- Background color customization
- Elevation and shadow control
- Border radius and shape configuration
- Drag handle styling and visibility
-
Interaction Features:
- Tap-to-dismiss on overlay
- Drag-to-dismiss with velocity detection
- Configurable dismissal behavior
- Multiple sheet support with toggle options
-
Layout & Sizing:
- Constraint-based sizing system
- MainAxisSize.min natural sizing
- Custom BoxConstraints support
- Status bar background extension
Documentation
- Comprehensive README with examples and best practices
- API documentation with detailed parameter descriptions
- Migration guides and troubleshooting section
- Example app demonstrating all features
Testing
- Complete widget test suite with 10+ test cases
- Coverage for all major functionality including:
- Basic sheet display and dismissal
- Anchor positioning
- Drag gesture handling
- Overlay tap dismissal
- Custom styling application
- Constraint handling
- Safe area behavior
Technical Implementation
- Built on Flutter's overlay system for optimal performance
- Constraint-based layout following Flutter's showModalBottomSheet pattern
- Automatic resource cleanup and memory management
- Comprehensive error handling and edge case coverage