A runnable Flutter app demonstrating every feature of the dialog_handler package.
cd example
flutter pub get
flutter runThe example depends on the local package via a path override, so any change you make in ../lib is picked up on the next run or hot restart.
The home screen is a single scrolling list of buttons, grouped by the feature each one demonstrates.
| Button | Demonstrates |
|---|---|
| Show BottomSheet Dialog | An overlayDialog that reports its own visibility with isDialogVisible, keyed bottomSheetDialog |
| Show Modal Dialog | A plain modalDialog |
| Show Modal Dialog With Background | backgroundWidget with a glass_kit blur for a frosted backdrop |
| Show FullPage Dialog | A pageDialog that dismisses on tap |
Each button shows a modalDialog with a different AnimationType — scaleToPosition, fromTopToPosition (centered and top aligned), fromBottomToPosition, fromLeftToPosition and fromRightToPosition — with animationDuration and animationReverseDuration varied to show their effect.
Top aligned banner style dialogs, including a bouncing variant using fromTopToPositionThenBounce, and an overlayDialog version that leaves the page behind it interactive.
Dialogs that close themselves after autoDismissalDuration, including a nested case where a second dialog is opened while the first is still counting down.
| Button | Demonstrates |
|---|---|
| USING A DIFFERENT DIALOG | customDialog wrapping showCupertinoModalBottomSheet from modal_bottom_sheet, so a third party dialog is still tracked by the handler |
| SHOW A FRESH DIALOG AFTER DISMISS OF PREV DIALOG | Sequencing — dismissing an overlay, then awaiting a bottom sheet that returns data |
| File | Contents |
|---|---|
lib/main.dart |
Every example, and the DialogManager that hosts them |
lib/dialog_widgets/ |
The dialog bodies — plain widgets, no base class required |
lib/extension.dart |
A small InkWell helper used to strip splash effects |
Only for the demos — none of these are required by dialog_handler itself:
glass_kit— the blurredbackgroundWidgetmodal_bottom_sheet— thecustomDialogdemo
See the package README for the complete API reference, recipes and behaviour notes.