How to Use ShellRoute with go_router and Nested Grandchildren - flutter

Flutter 3.3.10 & go_router 6.0.1
I have created a sample Flutter app for desktop that has a navigation bar on the left. I want my routes to navigate only to the right of the nav so the nav is persistent and never changes. Only the content in the "detail" pane of my app should change and navigate.
This works great when going between top-level pages or drilling down one level in the nav hierarchy:
But once you go from a child page to a grandchild page, the views animate over the top of the nav, which would suggest it's ignoring the ShellRoute established at the top of the navigation tree.
Here's my sample app: https://gist.github.com/cliftonlabrum/802f974be057306ca9205ccc6638e438
How do I force my grandchild views to respect the ShellRoute and only navigate/animate inside the detail portion of my UI?

Related

How to achieve this kind of navigation in flutter?

I want you guys' insight on how this kind of navigation can be achieved in Flutter. How can we put navigation bar on the left side of the screen? How this can be done in a cleanest way?
Source: https://dribbble.com/shots/6833189-Tablet-Banking-App
I tried using out of box widgets in flutter. But, nothing seems to match the above navigation logic.
Edit: The navigation bar should stay constant.
So if you want your right-side content to change, based on what you click in the left pane. Check out this video https://youtu.be/eikOZzfc0l4 by the official Flutter channel. I don't remember the details for myself. 😅
Edited:
I would use a stack. At the top of the stack, you can have the navigation bar. At the bottom of the stack is the actual app UI. Upon clicking one of the nav items, the UI at the bottom of the stack changes.

Nested navigation with flow_builder in Flutter

Good day! I wanted to implement navigation in my app with flow_builder package. I have bottom navigation bar with several tabs in it and inside each of the tab's route I have several nested routes. I have made a small example application and I have a problem with tab transitions, namely if you navigate to a route within a tab and try to change tab again the navigation stack changes very strangely. Am I using this package properly and is it even possible to implement such navigation with it? My sample app
[Edit]
I have nested FlowBuilder() inside each tab and now everything seems to work fine. However, I am not sure whether it is appropriate solution.

Flutter: Unable to go to login view from a persistent bottom nav bar based view

I have a persistent bottom nav bar based on this plugin.
The plugin allows building a page with few footer buttons and navigation etc. But, Once such a page has a logout button that must send the user back to Login view (outside of navbar) and I am stuck here. I've permuted with all the navigator operations available and am stuck here, unable to show a page without the bottom navbar appearing.
Any help is much appreciated! :)

Flutter manage push and pop for persistent bottom navigation bar

I'm using Custom Tab navigator to manage persistent bottom navigation bar across all the screens.
Due this Tab navigator sits in one StatefulWidget to host the tabs in the app, So unable to pop to the other widget out of these tabs and hosted widget.
Ex : After successful login, There is one widget Dashboard and it hosts the bottom navigation and tabs using Navigator. Now i want to logout from one of the tab and should navigate to the login screen, which is not part of any tabs or hosted widget.
While trying to push to Login widget, Showing only the blank screen. Because no route within the Custom navigator.
Any solution for this without using any package for persistent bottom navigation.

Tab bar at top and bottom

I would like to develop a ipad apps which has a menu at the top of the screen as well as at the bottom.
There are four buttons on the top of the screen, and there are 10+ buttons at the bottom tab bar, which can be scrolled horizontally.
How can I write the root view controller as a framework for this operation?
Should I customize the UIViewController class or UITabBarViewController?
Thanks
EDIT:
Sorry for being unclear. Let me restate my question.
Actually my app will have the following hierarchy.
'Front Page' is simply a page (view controller) for user to choose language. After choosing the language, 'Menu Page' view controller is displayed.
Starting from Menu page and ALL view controllers (VC) in below, the page layout is something like this.
As you can see, there are top menu and bottom menu. Clicking on the buttons the app will quickly jump to the corresponding view controller (3rd level in the tree, VC1,VC2,VC3 etc) . And for every view, there is a BACK button on every page, clicking which will back to the parent view controller.
I was thinking to implement this by using a tab bar view controller and a navigation view controller but I still do not have a clear idea how to implement this.
Or maybe should I just use the navigation view controller and hide the top tool bar except the back button, and display an overlay UIView as menu which is on top of all other UIViews.
Can somebody help me? Thanks.
Since this is the outermost container for my app I hope to do it properly at start..
Sorry for my long question.
If you really want to develop a framework for this logic .You need to create Manager, ViewController, View, DAO ,Model and other classes according to your needs.
I assume you want to add the buttons dynamically to the tabbar (and if it scrollable , it must be a scrollview).You can use Toolbar for upper view but then it won't be in sync with the bottom-view(visually).In that case you will have to create your own customized views to look like a tabbar.
The manager will basically keep a track of all the buttons and different states of events and action on the views and the same information can be accessed via a static method form the viewcontroller.
Well you have not detailed on your needs , so it's difficult to predict the entire architecture.
You need a container view controller to manage selection of VC's 1-4.
clicking which will back to the parent view controller
Parent view controller is used to mean the container vc in a container view controller scheme - I'm not sure that's what you mean in this comment. Where exactly does the back button go?
See this link for more info about container VC's.
https://developer.apple.com/library/ios/featuredarticles/ViewControllerPGforiPhoneOS/CreatingCustomContainerViewControllers/CreatingCustomContainerViewControllers.html
You should be able to embed a tab bar controller in the content view of the container VC. Should be able to but it might be really buggy if there is a lot of communication between the child vc's.
The hard part is the back button. Basically it must be a button that goes back to VC 1-4 depending on which section you are in. The easiest way to do it is to make sure that when you cycle view controllers, pass the back button information as to which VC is the current child so it knows which VC to navigate to when you press it.