showRGeneralDialog<T extends Object?> function Null safety

Future<T?> showRGeneralDialog<T extends Object?>(
  1. {required RoutePageBuilder pageBuilder,
  2. bool barrierDismissible = false,
  3. String? barrierLabel,
  4. Color barrierColor = const Color(2147483648),
  5. Duration transitionDuration = const Duration(milliseconds: 200),
  6. RouteTransitionsBuilder? transitionBuilder,
  7. bool useRootNavigator = true,
  8. RouteSettings? routeSettings}
)

Implementation

Future<T?> showRGeneralDialog<T extends Object?>({
  required RoutePageBuilder pageBuilder,
  bool barrierDismissible = false,
  String? barrierLabel,
  Color barrierColor = const Color(0x80000000),
  Duration transitionDuration = const Duration(milliseconds: 200),
  RouteTransitionsBuilder? transitionBuilder,
  bool useRootNavigator = true,
  RouteSettings? routeSettings,
}) {
  BuildContext context = RRouter.context;
  assert(pageBuilder != null);
  assert(useRootNavigator != null);
  assert(!barrierDismissible || barrierLabel != null);
  return Navigator.of(context, rootNavigator: useRootNavigator)
      .push<T>(RawDialogRoute<T>(
    pageBuilder: pageBuilder,
    barrierDismissible: barrierDismissible,
    barrierLabel: barrierLabel,
    barrierColor: barrierColor,
    transitionDuration: transitionDuration,
    transitionBuilder: transitionBuilder,
    settings: routeSettings,
  ));
}