0
When I activate the
Navigator.pushReplacement(
context,
CupertinoPageRoute(
builder: (context) => ContactFound(key, index, model)));
This screen is under a menu (Instagram style).
I wonder if you have how to return this screen above all widgets. Could use stack but as I did not build the app and redo using this method would take too long.
Certain point of the code has a decision structure in which depending on what occurs returns a different screen.
EXAMPLE:
if(decisao == 1){
Navigator.pushReplacement(
context,
CupertinoPageRoute(
builder: (context) => ContactFound(key, index, model)));
}
However, this screen returns over other widgets less than a menu at the bottom which is a CupertinoTabView
(Instagram style). How could I return this screen above this menu ?
It was not clear your doubt, to trigger
PushReplacement
it will not stack itself and yes subistitui the current route by which was called, if you want to stack, then should call only thePush
.– Chance
It wouldn’t be that. When I call it even that way this screen somehow sits underneath the app’s menu, as I said in the post
– Marcelo Lemos 7
Strange theoretically was for the screen to stack on top of the current screen, even if there was a topbar or bottombar, without a little code gets complicated to visualize. If there is no way by code, show us how the structure of the screens is organized.
– Chance
So I would like to post but as it is not of my own makes it complicated. I will try to post something to help in understanding the issue.
– Marcelo Lemos 7
@Justcase I edited the question
– Marcelo Lemos 7
I took a look at the cupertinotabview, it manages the stacking of the screens, why the screen is stacking under the menu. In the documentation it says that to stack a screen above the cupertinotabview, Voce should call the
Navigator.of(rootNavigator: true)
before stacking Ex:Navigator.of(context, rootNavigator: true).push( new CupertinoPageRoute<bool>(fullscreenDialog: true, builder: (BuildContext context) => ContactFound(key, index, model));
– Chance
Full example and the;Doc Cupertinotabview
– Chance
Dude It worked here but add that little arrow to come back, and when I give the pop, Uga again...at last you helped me a lot. Thanks
– Marcelo Lemos 7
@Justcase create an answer pointing out what you mentioned in the comments, so that it is helpful if someone goes through the same problem as our friend there. PS: Place the links too that are very helpful.
– Matheus Ribeiro
All right, that’s something. When I get home I will fully reproduce this case, I use little the package of Upertino, so I was limited in helping you, and I will improve the response after I see completely.
– Chance
I managed to solve the problem with some parameters in the app decision block so this ok so far kkk thank you very much
– Marcelo Lemos 7