simple_animated_dialog
A simple and customizable package for creating animated dialogs in Flutter. It supports a variety of dialog transition animations such as sliding, fading, scaling, and more, making it easy to add polished dialog transitions to your Flutter app.
Features
- Multiple dialog transition types:
- Fade
- Slide from top, bottom, left, right
- Fade with slide from any direction
- Scale and fade-scale
- Size and size-fade
- No animation
- Customizable animation duration, alignment, and curves
- Built on top of Flutter's
showGeneralDialog, offering full-screen modal dialogs - Safe area handling to avoid UI clipping
Available Transition Types
fadeslideFromTop,slideFromBottom,slideFromLeft,slideFromRightslideFromTopFade,slideFromBottomFade,slideFromLeftFade,slideFromRightFadescalefadeScalesize,sizeFadenone(No animation)
Installation
Add simple_animated_dialog to your pubspec.yaml file:
dependencies:
simple_animated_dialog: <version_number>
Usage
import 'package:flutter/material.dart';
import 'package:simple_animated_dialog/simple_animated_dialog_lib.dart';
void showMyCustomDialog(BuildContext context) {
showAnimatedDialog<dynamic>(
barrierDismissible: true,
context: context,
builder: (BuildContext context) => GestureDetector(
onTap: () {},
child: Dialog(
shadowColor: Colors.grey,
backgroundColor: Theme.of(context).dialogBackgroundColor,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(dialogRadius))),
child: child,
),
),
animationType: DialogTransitionType.fade,
curve: Curves.linear,
duration: const Duration(milliseconds: 200),
);
}
Additional information
In progress