showCGeneralDialog<T extends Object?> function

Future<T?> showCGeneralDialog<T extends Object?>({
  1. required BuildContext context,
  2. required RoutePageBuilder pageBuilder,
  3. Cancellable? cancellable,
  4. bool barrierDismissible = false,
  5. String? barrierLabel,
  6. Color barrierColor = const Color(0x80000000),
  7. Duration transitionDuration = const Duration(milliseconds: 200),
  8. RouteTransitionsBuilder? transitionBuilder,
  9. bool useRootNavigator = true,
  10. RouteSettings? routeSettings,
  11. Offset? anchorPoint,
})

Implementation

Future<T?> showCGeneralDialog<T extends Object?>({
  required BuildContext context,
  required RoutePageBuilder pageBuilder,
  Cancellable? cancellable,
  bool barrierDismissible = false,
  String? barrierLabel,
  Color barrierColor = const Color(0x80000000),
  Duration transitionDuration = const Duration(milliseconds: 200),
  RouteTransitionsBuilder? transitionBuilder,
  bool useRootNavigator = true,
  RouteSettings? routeSettings,
  Offset? anchorPoint,
}) {
  assert(!barrierDismissible || barrierLabel != null);

  final navigator = Navigator.of(context, rootNavigator: useRootNavigator);
  final route = RawDialogRoute<T>(
    pageBuilder: pageBuilder,
    barrierDismissible: barrierDismissible,
    barrierLabel: barrierLabel,
    barrierColor: barrierColor,
    transitionDuration: transitionDuration,
    transitionBuilder: transitionBuilder,
    settings: routeSettings,
    anchorPoint: anchorPoint,
  );
  return navigator.pushCancellableRoute(route, cancellable);
}