showCDialog<T> function
Future<T?>
showCDialog<T>({
- required BuildContext context,
- required WidgetBuilder builder,
- Cancellable? cancellable,
- bool barrierDismissible = true,
- Color? barrierColor = Colors.black54,
- String? barrierLabel,
- bool useSafeArea = true,
- RouteSettings? routeSettings,
- Offset? anchorPoint,
Implementation
Future<T?> showCDialog<T>({
required BuildContext context,
required WidgetBuilder builder,
Cancellable? cancellable,
bool barrierDismissible = true,
Color? barrierColor = Colors.black54,
String? barrierLabel,
bool useSafeArea = true,
bool useRootNavigator = true,
RouteSettings? routeSettings,
Offset? anchorPoint,
// TraversalEdgeBehavior? traversalEdgeBehavior,
}) {
assert(debugCheckHasMaterialLocalizations(context));
final navigator = Navigator.of(context, rootNavigator: useRootNavigator);
final CapturedThemes themes = InheritedTheme.capture(
from: context,
to: navigator.context,
);
final route = DialogRoute<T>(
context: context,
builder: builder,
barrierColor: barrierColor,
barrierDismissible: barrierDismissible,
barrierLabel: barrierLabel,
useSafeArea: useSafeArea,
settings: routeSettings,
themes: themes,
anchorPoint: anchorPoint,
// traversalEdgeBehavior:
// traversalEdgeBehavior ?? TraversalEdgeBehavior.closedLoop,
);
return navigator.pushCancellableRoute(route, cancellable);
}