Closed o3web closed 1 year ago
From what you described there is one flow of pushing your dialog and screen that could lead to this problem: If your Dialog is pushed to the root Navigator (by using showDialog(..., rootnNavigator: true);
), then the context inside your Dialog can only use this root navigator, no matter what you do. So at the moment you want to push your contactsHome screen, you are using a context that cant contain the navigator of the current PersistentBottomNavBar tab (every tab of your navbar creates its own navigator to provide parallel navigation stacks that dont overwrite each other), thus any call of pushNewScreen
wont contain the navbar.
To solve that you have two options:
showDialog(rootNavigator: false)
Hi,
I've an issue with the PersistentBottomNavBar. When i push a new screen by click on a Dialog "ok" button. The nav bar disappear on the new screen event if i put "withNavBar: true" .
Here is the code i using to redirect after the API return 200 response. My onPressed environement is async to allow the JSON return.
PersistentNavBarNavigator.pushNewScreen( context, screen: const contactsHome(), withNavBar: true, pageTransitionAnimation: PageTransitionAnimation.cupertino, )
Do you think is due to the "async" onPressed ?
Regards,