dupe_modal_bottom_sheet 1.0.0 copy "dupe_modal_bottom_sheet: ^1.0.0" to clipboard
dupe_modal_bottom_sheet: ^1.0.0 copied to clipboard

A customizable bottom sheet with Hero animation support, implementing all features of showModalBottomSheet.

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.0.0 - 2026-02-11 #

🎉 Initial Release #

First stable release of dupe_modal_bottom_sheet - a Flutter package that brings Hero animation support to modal bottom sheets while maintaining 100% API compatibility with Flutter's standard showModalBottomSheet.

✨ Features #

Core Functionality

  • showDupeModalBottomSheet function - Drop-in replacement for showModalBottomSheet
    • Complete API compatibility with all standard parameters
    • Zero breaking changes for migration
    • Works seamlessly with existing codebases

Hero Animation Support

  • Native Hero animations in modal bottom sheets
    • Smooth shared element transitions
    • Proper positioning during Hero flight phase
    • Works with complex animations including image galleries
    • Custom PageRoute implementation for accurate target positioning

Styling & Customization

  • Background color, elevation, and shape customization
  • Material 3 surface tint color support
  • Custom border shapes with clip behavior
  • Additional size constraints via BoxConstraints

User Interaction

  • Drag to dismiss functionality
  • Optional drag handle indicator
  • Customizable barrier (color, dismissible, semantic labels)
  • Full accessibility support with screen readers

Layout & Sizing

  • Scroll-controlled mode for full-height expansion
  • Configurable height ratio (default 9/16 screen height)
  • Safe area awareness and padding support
  • Display feature compatibility (foldable screens, hinges)

Animation System

  • Custom animation styles (duration, curve)
  • External animation controller support
  • Smooth slide transitions with drag tracking
  • Default animations: 250ms open, 200ms close

Developer Experience

  • 100% test coverage - 11 comprehensive test cases
  • Complete documentation - DartDoc comments on all APIs
  • Example app - Interactive gallery showcasing all features
  • Migration guide - Seamless transition from standard modal sheets

📝 Technical Details #

Implementation:

  • Custom DupeModalBottomSheetRoute<T> extending PageRoute<T>
  • Content alignment during build phase (not transition phase)
  • Optimized with RepaintBoundary for better performance
  • Separate layout widget for clean separation of concerns

Compatibility:

  • Flutter SDK: >=3.0.0
  • Dart SDK: >=3.0.0 <4.0.0
  • iOS & Android platforms
  • Material 3 design system

🐛 Known Issues #

None at this time.

📚 Documentation #

  • Complete README with usage examples
  • API reference documentation
  • Migration guide from showModalBottomSheet
  • Example application in /example directory

💡 Why This Package? #

Flutter's built-in showModalBottomSheet uses ModalRoute, which doesn't properly support Hero animations due to timing issues in the animation system. This package solves that by using a custom PageRoute that aligns content during the buildPage phase, allowing the Hero system to correctly calculate widget positions and create smooth transitions.


Full Changelog: https://github.com/yourusername/dupe_modal_bottom_sheet/commits/v1.0.0

0
likes
160
points
41
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A customizable bottom sheet with Hero animation support, implementing all features of showModalBottomSheet.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter

More

Packages that depend on dupe_modal_bottom_sheet