BilalShahid13 / PersistentBottomNavBar

A highly customizable persistent bottom navigation bar for Flutter
BSD 3-Clause "New" or "Revised" License
507 stars 371 forks source link

How to pushAndRemoveUntil to a screen without showing NavBar #279

Closed Moise-Nturubika closed 2 years ago

Moise-Nturubika commented 2 years ago

I hope you will help me to find a solution to this problem. In my projet, my profil screen are in the tabs of persistentTabView. On this screen is the logout button, but when I click on it to return to the login page, it returns to the login page with the tabBar visible. I use Navigator.of(context).pushAndRemoveUntil function. How can i do to return to login page without showing the NavBar

Adimarogonas commented 2 years ago

Navigator.of(context, rootNavigator: true).push() alternatively pushNewScreen(context, withNavBar: false, screen:YourScreen())

Moise-Nturubika commented 2 years ago

@Adimarogonas thank you. The problem is resolved by the first proposition: Navigator.of(context, rootNavigator: true).pushAndRemoveUntil().