Is there an auto_route oriented alternative to directly calling 'showDialog'? #1712
Unanswered
Adam-Langley
asked this question in
Q&A
Replies: 2 comments 2 replies
-
I think 'fullscreenDialog' on the route is the way to do it... |
Beta Was this translation helpful? Give feedback.
1 reply
-
You can use like this in route declaration. CustomRoute(
page: ConfirmConnectionDialogRoute.page,
path: '/confirmation',
customRouteBuilder:
<T>(BuildContext context, Widget child, AutoRoutePage<T> page) {
return DialogRoute(
context: context,
// this is important
settings: page,
builder: (_) => child,
);
},
),
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It feels odd to navigate throughout the application using the Router, but resort to 'showDialog' when I want to display a modal settings screen.
Is there a way to overlay an '@RoutePage' over the existing application without interrupting it? Kind of like co-existing routes, one of them is paused while the other overlays it?
Or some better way to do it that has perhaps become the defacto way of doing it with auto_route, but just not been documented yet?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions