Package selection guidance compiled from public package information, community data, and project usage.
Modals is a Flutter package designed to simplify the creation and management of overlays, such as dialogs, bottom sheets, and custom popups. It provides a clean, consistent API for displaying and handling modals across all platforms, reducing boilerplate code and improving developer experience. With built-in support for animations, dismissibility, and responsive layouts, it streamlines common overlay patterns in Flutter apps. The package is ideal for developers seeking a lightweight, reliable solution for managing UI overlays without complex setup.
Use cases
Displaying dialogs and alerts
Creating custom overlay screens
Managing bottom sheet interactions
Implementing guided user flows
Handling modal navigation
Simplifying popup logic
Key features
Unified modal API
Cross-platform compatibility
Built-in animations
Easy dismissal handling
Responsive design support
Minimal boilerplate
Suitable for
Flutter beginners
UI-heavy applications
Apps with frequent overlays
Developers wanting consistency
Teams prioritizing maintainability
Projects requiring rapid prototyping
Considerations
Limited to overlay-specific functionality
No built-in state management
Requires manual integration with existing state solutions
Not suitable for complex navigation stacks
Depends on Flutter's rendering pipeline
May need additional styling for advanced designs
Original README
Original README snapshot from the linked source repository. Visit the repository for the latest content.
Modals
Flutter overlays simplified!
Motivation
Working with Flutter overlays is quite cumbersome. Adding a simple context menu next to your button should not be hard.
Say hello 👋 to Modals, a package to simplify all your overlay needs!
Features
Show modals easily
Position modals using absolute position
Position modals using alignment
Position modals based on another widget position
Prioritise modal visibility
Remove modals easily
Remove modal by id
Remove all modals at once
Remove modal by tapping modal barrier
Remove modals on route changes
How to use
Showing modals
showModal is used to show modals. Function accepts a ModalEntry as parameter.
ModalEntry has 3 options ModalEntry.positioned, ModalEntry.aligned and ModalEntry.anchored