showRDialog<T> function

Future<T> showRDialog <T>(
  1. {bool barrierDismissible: true,
  2. WidgetBuilder builder}
)

Implementation

Future<T> showRDialog<T>({
  bool barrierDismissible = true,
  WidgetBuilder builder,
}) {
  BuildContext context = RRouter.context;
  assert(debugCheckHasMaterialLocalizations(context));
  final ThemeData theme = Theme.of(context, shadowThemeOnly: true);
  return showRGeneralDialog(
    pageBuilder: (BuildContext buildContext, Animation<double> animation,
        Animation<double> secondaryAnimation) {
      final Widget pageChild = Builder(builder: builder);
      return SafeArea(
        child: Builder(builder: (BuildContext context) {
          return theme != null
              ? Theme(data: theme, child: pageChild)
              : pageChild;
        }),
      );
    },
    barrierDismissible: barrierDismissible,
    barrierLabel: MaterialLocalizations.of(context).modalBarrierDismissLabel,
    barrierColor: Colors.black54,
    transitionDuration: const Duration(milliseconds: 150),
    transitionBuilder: _buildMaterialDialogTransitions,
  );
}