anchored_sheets 1.1.1
anchored_sheets: ^1.1.1 copied to clipboard
A Flutter package to create anchored sheets that can be dragged and snapped to different positions on the screen.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.1.1 - 2025-08-22 #
Changed #
- ๐ Function naming consistency - Updated
dismissTopModalSheettodismissAnchoredSheetthroughout documentation - ๐ง API alignment - Function names now better align with package name for improved developer experience
Fixed #
- ๐ Documentation accuracy - All code examples now use consistent function naming
1.1.0 - 2025-08-22 #
Added #
- ๐ Comprehensive documentation - Detailed README with examples and API reference
- ๐งช Widget testing support - Complete test suite with helper functions
- ๐ง GitHub Actions CI/CD - Automated testing and code quality checks
- ๐ Code formatting compliance - 80-character line length standards
Improved #
- ๐จ Documentation clarity - Enhanced code examples and usage patterns
- ๐๏ธ Project structure - Better organized codebase with comprehensive comments
1.0.0 - 2025-08-22 #
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 sheetsdismissAnchoredSheet()- 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