I want to have a navigation like instagram. I will have a bottom navigation bar and each of its items I want to navigate other pages as an example in categories I want to navigate categories detail page and still keep the bottom nav bar.
I tried routers but I am no expert so I failed and there is little information about that.
I tried IndexedStack didn't work.
I tried wrapping my apps body with Navigator. It worked a little but not the way I wanted to.
In this last method I lost my bottom nav bar after clicking categoriesdetails
I want to click those to navigate
In each of those buttons I will navigate to their own detail page but when I click them I lose my bottom navigation bar.
I tried other methods and one time I kept the bottom nav bar but when I clicked its items did not change my page.
I don't know if you happened to check out go_router. It has a nifty solution for this using the ShellRoute which states :
A route that displays a UI shell around the matching child route.
You can then go on and define a particular widget as the "shell" widget for all routes under it. Meaning it will be available for all routes under it.
You can check the example linked. If the example in the documentation is a bit hard to grasp, I went on to create an example for you to play with.
The live example is available on Zapp here and the code itself can be viewed here.
Please note I added only one sub-route for each main route. You can, however, add as many sub-routes as you want.