fullscreenDialog property
Whether this page route is a full-screen dialog.
In Material and Cupertino, being fullscreen has the effects of making the app bars have a close button instead of a back button. On iOS, dialogs transitions animate differently and are also not closeable with the back swipe gesture.
Implementation
@override
bool get fullscreenDialog {
if (isNested && isFirst && ModalRoute.of(nuvigator!.context) is PageRoute) {
final containedPageRoute =
ModalRoute.of(nuvigator!.context) as PageRoute<dynamic>?;
return super.fullscreenDialog || containedPageRoute!.fullscreenDialog;
}
return super.fullscreenDialog;
}