showRCupertinoDialog<T> function

Future<T> showRCupertinoDialog <T>(
  1. {@required WidgetBuilder builder,
  2. RouteSettings routeSettings}
)

Implementation

Future<T> showRCupertinoDialog<T>({
  @required WidgetBuilder builder,
  RouteSettings routeSettings,
}) {
  BuildContext context = RRouter.context;
  assert(builder != null);
  return showRGeneralDialog(
    barrierDismissible: false,
    barrierColor: CupertinoDynamicColor.resolve(_kModalBarrierColor, context),
    // This transition duration was eyeballed comparing with iOS
    transitionDuration: const Duration(milliseconds: 250),
    pageBuilder: (BuildContext context, Animation<double> animation,
        Animation<double> secondaryAnimation) {
      return builder(context);
    },
    transitionBuilder: _buildCupertinoDialogTransitions,
    routeSettings: routeSettings,
  );
}