super_dialog 0.2.0
super_dialog: ^0.2.0 copied to clipboard
A powerful, flexible, and beautifully animated dialog toolkit for Flutter. Create stunning dialogs with smooth slide, scale, and fade animations.
βοΈ Super Dialog #
Beautiful Animated Dialogs for Flutter #
A powerful, flexible, and beautifully animated dialog toolkit for Flutter.
Create stunning dialogs with smooth slide, scale, and fade animations.
π Documentation β’ π Quick Start β’ π Examples β’ π§ͺ Demo
β¨ Features #
π¬ Rich Animations #
|
π Positioned Dialogs #
|
βοΈ Highly Configurable #
|
π§ Developer Friendly #
|
π¦ Installation #
Add to your pubspec.yaml:
dependencies:
super_dialog: ^0.2.0
flutter pub get
π Quick Start #
Basic Dialog #
import 'package:super_dialog/super_dialog.dart';
SuperDialog.showAnimatedDialog<void>(
context,
(context) => const MyCustomDialog(),
animation: DialogAnimation.bottomToTop,
);
Positioned Dialog (NEW in 0.2.0) #
SuperDialog.showPositionedDialog<void>(
context,
(context) => const MyDialog(),
startPosition: DialogPosition.topEnd,
endPosition: DialogPosition.center,
transitionType: PositionedTransitionType.slideFadeScale,
);
π¬ Animation Types #
| Animation | Description | Best For |
|---|---|---|
startToEnd |
Slides from leading edge (RTL-aware) | Side drawers, navigation panels |
endToStart |
Slides from trailing edge (RTL-aware) | Settings panels, details views |
topToBottom |
Drops from top | Notifications, banners, alerts |
bottomToTop |
Rises from bottom | Action sheets, bottom menus |
centerScale |
Scales from 92% with fade | Confirmations, important alerts |
centerFade |
Simple fade in/out | Toasts, status messages |
π Positioned Dialogs (v0.2.0) #
Fine-grained control over dialog positioning with a 3Γ3 grid system:
βββββββββββββββ¬ββββββββββββββ¬ββββββββββββββ
β topStart β topCenter β topEnd β
βββββββββββββββΌββββββββββββββΌββββββββββββββ€
β centerStart β center β centerEnd β
βββββββββββββββΌββββββββββββββΌββββββββββββββ€
β bottomStart βbottomCenter β bottomEnd β
βββββββββββββββ΄ββββββββββββββ΄ββββββββββββββ
DialogPosition Enum #
| Position | Description |
|---|---|
topStart |
Top-left (RTL: top-right) |
topCenter |
Top-center |
topEnd |
Top-right (RTL: top-left) |
centerStart |
Center-left (RTL: center-right) |
center |
Center of screen |
centerEnd |
Center-right (RTL: center-left) |
bottomStart |
Bottom-left (RTL: bottom-right) |
bottomCenter |
Bottom-center |
bottomEnd |
Bottom-right (RTL: bottom-left) |
offScreen |
Outside screen (for slide-in) |
PositionedTransitionType Enum #
| Type | Description |
|---|---|
slide |
Pure sliding motion |
slideFade |
Slide with opacity fade |
slideScale |
Slide with zoom effect |
slideFadeScale |
All three combined |
fade |
Opacity only (no movement) |
scale |
Zoom only (no movement) |
scaleFade |
Zoom with opacity (no movement) |
Usage Example #
// Corner to center with all effects
SuperDialog.showPositionedDialog<void>(
context,
(context) => MyDialog(),
startPosition: DialogPosition.bottomEnd,
endPosition: DialogPosition.center,
transitionType: PositionedTransitionType.slideFadeScale,
config: const SuperDialogConfig(
openDuration: Duration(milliseconds: 400),
openCurve: Curves.easeOutBack,
),
);
// Slide from off-screen to bottom
SuperDialog.showPositionedDialog<void>(
context,
(context) => BottomSheet(),
startPosition: DialogPosition.offScreen,
endPosition: DialogPosition.bottomCenter,
);
π API Reference #
SuperDialog Methods #
// Standard dialog (barrier dismissible by default)
SuperDialog.showAnimatedDialog<T>(...);
// Full control dialog (barrier NOT dismissible by default)
SuperDialog.showAnimatedGeneralDialog<T>(...);
// Platform-adaptive dialog (iOS: bottom sheet style)
SuperDialog.showAnimatedAdaptiveDialog<T>(...);
// Positioned dialog with custom start/end positions (NEW)
SuperDialog.showPositionedDialog<T>(...);
SuperDialogConfig #
Fine-tune animation timing:
const SuperDialogConfig({
Duration openDuration = const Duration(milliseconds: 300),
Duration closeDuration = const Duration(milliseconds: 300),
Curve openCurve = Curves.easeInOut,
Curve closeCurve = Curves.easeInOut,
});
Common Parameters #
| Parameter | Type | Default | Description |
|---|---|---|---|
context |
BuildContext |
required | Build context |
builder |
WidgetBuilder |
required | Dialog content builder |
animation |
DialogAnimation |
startToEnd |
Animation style |
config |
SuperDialogConfig? |
null |
Timing configuration |
constraints |
BoxConstraints? |
null |
Size constraints |
barrierDismissible |
bool? |
true* |
Tap outside to dismiss |
barrierColor |
Color? |
#B3000000 |
Barrier overlay color |
barrierBlur |
double? |
null |
Gaussian blur amount |
useSafeArea |
bool |
true |
Respect safe area |
useRootNavigator |
bool? |
true |
Use root navigator |
onDismissed |
VoidCallback? |
null |
Dismissal callback |
*Default varies by method and platform
Positioned Dialog Parameters #
| Parameter | Type | Default | Description |
|---|---|---|---|
startPosition |
DialogPosition |
required | Start position |
endPosition |
DialogPosition |
required | End position |
transitionType |
PositionedTransitionType |
slideFade |
Transition effect |
π Examples #
ποΈ Slide-In Drawer
SuperDialog.showAnimatedDialog(
context,
(context) => FractionallySizedBox(
widthFactor: 0.7,
alignment: AlignmentDirectional.centerStart,
child: const NavigationDrawer(),
),
animation: DialogAnimation.startToEnd,
barrierColor: Colors.black26,
);
π Positioned Corner Dialog
SuperDialog.showPositionedDialog(
context,
(context) => const NotificationCard(),
startPosition: DialogPosition.topEnd,
endPosition: DialogPosition.topEnd,
transitionType: PositionedTransitionType.slideFade,
);
π Corner to Center Transition
SuperDialog.showPositionedDialog(
context,
(context) => const ModalDialog(),
startPosition: DialogPosition.bottomStart,
endPosition: DialogPosition.center,
transitionType: PositionedTransitionType.slideFadeScale,
);
π Bottom Action Sheet
SuperDialog.showPositionedDialog(
context,
(context) => const ActionSheet(),
startPosition: DialogPosition.offScreen,
endPosition: DialogPosition.bottomCenter,
transitionType: PositionedTransitionType.slideFade,
);
β Confirmation Modal
final confirmed = await SuperDialog.showAnimatedDialog<bool>(
context,
(context) => ConfirmDialog(
onConfirm: () => Navigator.pop(context, true),
onCancel: () => Navigator.pop(context, false),
),
animation: DialogAnimation.centerScale,
constraints: const BoxConstraints(maxWidth: 400),
);
π± Platform Adaptive
SuperDialog.showAnimatedAdaptiveDialog(
context,
(context) => const CrossPlatformDialog(),
);
π§ͺ Demo App #
π Live Demo #
[π Try it online: https://GeniusSystems24.github.io/super_dialog/](https://GeniusSystems24.github.io/super_dialog/)
The package includes a comprehensive example app with:
- 18+ animation scenarios (6 animation types Γ 3 variants)
- 63 positioned combinations (9 positions Γ 7 transition types)
- Light/Dark theme support
- Beautiful, modern UI
Run Locally #
cd example
flutter run
π Requirements #
| Requirement | Version |
|---|---|
| Dart SDK | β₯3.10.3 |
| Flutter | β₯1.17.0 |
Supported Platforms #
β Android β’ β iOS β’ β Web β’ β Windows β’ β macOS β’ β Linux
π License #
MIT License
Copyright (c) 2025 Genius Systems
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
Built with β€οΈ by Genius Systems 24