PersistentBottomNavBarV2 icon indicating copy to clipboard operation
PersistentBottomNavBarV2 copied to clipboard

Using Go Router with PersistentBottomNavBar

Open LennartMart opened this issue 2 years ago • 2 comments

I'm building a new app in Flutter with Go_Router and PersistentBottomNavBar (Since all new recipes point to Go_Router as the go-to navigation solution). Is there an option to integrate Go_Router with PersistentBottomNavBar? If I do something like pushNewScreenWithRouteSettings( context, screen: ProductsListScreen(), settings: RouteSettings(name: "/products"), );, the page isn't pushed to the stack of Go_Router.

LennartMart avatar Aug 02 '22 12:08 LennartMart

For other people that want to user this navbar with Go_Router:

  1. Remove AppBar & Drawer from the Scaffold with the navbar
  2. Add them to every separate screen
  3. Using Go_Router inside the tabs of the navbar is impossible. Just go with pushNamedScreen on these occasions

If you're using EndDrawer, you'll need to add this in your AppBar: leading: (ModalRoute.of(context)?.canPop ?? false) ? const BackButton() : null,

LennartMart avatar Aug 10 '22 20:08 LennartMart

I'll look at it, but it might take some time as I never used Go_Router. There is actually another issue related to that already #24. I will reopen the issue to keep track of it.

jb3rndt avatar Aug 16 '22 19:08 jb3rndt

Any news on this?

jasonlessenich avatar Jan 18 '23 15:01 jasonlessenich

Not really, I had no time yet to take a deep look into it. Maybe after the beta is released

jb3rndt avatar Jan 18 '23 22:01 jb3rndt

Not really, I had no time yet to take a deep look into it. Maybe after the beta is released

Alrighty, thanks for the quick reply. Since i'm in the middle of implementing the go_router into my project, it's pretty crucial for me that this works. Haven't tried if those issues actually affect me, but if they do, i'll maybe just investigate that myself and do a quick pr

jasonlessenich avatar Jan 19 '23 00:01 jasonlessenich

If you are in the topic already anyway, a PR would be a huge help, so dont hesitate :)

jb3rndt avatar Jan 19 '23 17:01 jb3rndt

The newest beta contains support for go_router. See this issue for more information: https://github.com/jb3rndt/PersistentBottomNavBarV2/issues/24. Closing this as a duplicate.

jb3rndt avatar Sep 17 '23 09:09 jb3rndt