showNashDialog<T> function

Future<T?> showNashDialog<T>({
  1. required BuildContext context,
  2. required Widget child,
  3. bool barrierDismissible = true,
  4. bool useRootNavigator = true,
})

Shows a themed dialog and returns the dialog widget.

Implementation

Future<T?> showNashDialog<T>({
  required BuildContext context,
  required Widget child,
  bool barrierDismissible = true,
  bool useRootNavigator = true,
}) =>
    showGeneralDialog<T>(
      context: context,
      barrierDismissible: barrierDismissible,
      useRootNavigator: useRootNavigator,
      barrierLabel: MaterialLocalizations.of(context).modalBarrierDismissLabel,
      barrierColor: Colors.black.withValues(alpha: 0.5),
      transitionDuration: const Duration(milliseconds: 250),
      transitionBuilder: (BuildContext context, Animation<double> animation,
              Animation<double> secondary, Widget child) =>
          FadeTransition(
        opacity: animation,
        child: ScaleTransition(
          scale: Tween<double>(begin: 0.9, end: 1).animate(
            CurvedAnimation(parent: animation, curve: Curves.easeOutBack),
          ),
          child: child,
        ),
      ),
      pageBuilder: (BuildContext context, Animation<double> animation,
              Animation<double> secondary) =>
          child,
    );