showAnimatedDialog<T> function

Future<T?> showAnimatedDialog<T>({
  1. required BuildContext context,
  2. required RoutePageBuilder pageBuilder,
})

Shows a dialog with default animations.

Implementation

Future<T?> showAnimatedDialog<T>({required BuildContext context, required RoutePageBuilder pageBuilder}) {
  return showGeneralDialog<T>(
    context: context,
    transitionBuilder: (context, a1, a2, child) => ScaleTransition(
      scale: Tween<double>(begin: 1.2, end: 1).animate(a1),
      child: FadeTransition(
        opacity: a1,
        child: child,
      ),
    ),
    pageBuilder: pageBuilder,
  );
}