showCGeneralDialog<T extends Object?> function
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,
- RouteSettings? routeSettings,
- 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);
}