Flutter navigation menu - flutter

I'm starting out with Flutter and I'd like to make an application similar to this one here: https://github.com/fluttermapp/flutter-ui-panel-dashboard
The app works fine, the only problem I have is getting the navigation to work. I see that there is a drawer set up, but unfortunately I have no idea how to set up routing for other pages.
https://github.com/fluttermapp/flutter-ui-panel-dashboard/blob/main/lib/widget_tree.dart#L72
Could you please advise me how to set up the routing via the drawer?

I found the solution via go_router:
https://pub.dev/packages/go_router

Related

Flutter Web Navigation w/ Static Menu Bar?

I'm coming from Flutter Mobile and have been asked to build a flutter web app. I'm literally stuck on what feels like something that should be easy to do and I cannot for the life of me find any tutorial that is helpful.
The long and short is how can I build a flutter web app with a static navigation bar and only load pages into the "content" portion of the app.
I've been looking at this tutorial: https://dariadobszai.medium.com/interactive-navigation-items-in-flutter-web-7fccc5975779 however I can't figure out how to get it working with GoRouter. The pages also load a bit clunky.
Almost all the tutorials I can find are about resizing for web/mobile and do not get into any actual navigation. The responsiveness is nice, but how the heck do I navigate between pages with a static menu bar for a nice user experience?
Ideally the solution will utilize this menu (or one like it): https://pub.dev/packages/easy_sidemenu and https://pub.dev/packages/go_router.
Thank you!
I suggest start researching about Go router first not how to implement a static menu navigation bar, since Go router uses declarative routing which changes completely how navigation should be handled.
I recommend this repo since it has different examples to use Go router, though be careful some examples may be deprecated.

Best practice for implementing the window_manager package for multiple screens/pages in a flutter app

I created a flutter app with several screens/pages where you can move back and forth between them and also an authentication screen.
Now I wanted to change the standard windows title bar where you minimize/maximize your frame and stumbled across the window_manager package on pub.dev which is exactly what I needed. Only problem here is the missing documentation for multiple screens. In the example there is only a one page app.
So do you have any ideas/advices you could share with me?

Flutter Web: How to keep the navbar?

I have a basic layout for a webapp I'm trying to build with flutter. Basically there is a navbar on the left side of the screen and the content should fill the rest of the page.
Whenever a user clicks a link in the navbar, the content should update accordingly. I have an understanding on how this would work with the "old" Navigator and named routes. However, users need to be able to access certain content directly by url and the url may contain parameters, so do I have to use a Router?
From my (limited) understanding, I have to use MaterialApp.router to use a Router, but this will always redraw the WHOLE page, including the navbar.
Is there an option to update only the content part, without updating the surrounding layout?
Thanks in advance!
Go check out navigationRail in flutter, if that helps.

User gestures and back button are not working when using PageRouteBuilder

to achieve a fade transition I used a PageRouteBuilder()to build some of my routes.
I noticed however while testing the app that the back button on Android and The User gesture on IOS are not working to navigate back to previous route!
Is this the normal behavior of the PageRouteBuilder()? or am I maybe doing something wrong?
thanks a lot!
So as it turned out, in MaterialPageRoute() the PageTransitionBuilder is selected based on which platform the app is running on.
I was able to get it to work for Android by using the WillPopScope() widget, as I was using Nested Navigators.
However, on IOS for the back gesture they are using the private class _CupertinoBackGestureController and I don't think there is an easy way to achieve that at this moment!
Hope that helps whoever is facing the same thing and thanks again!
The popup to back button has nothing to do with PageRouteBuilder, but has something to do with how you are inserting the second page in the stack.
If you are using Navigator.pushNamed(context, <PageRouteBuilder>), this will keep the first page in the stack and the back button should work.
However, If you are using Navigator.pushNamedReplacement(context, <PageRouteBuilder>), it will remove the first page and push the second page to stack.
I'm currently experimenting with wrapping the page to be pushed in a GestureDetector, and then setting one of the onHorizontalDrag properties to pop the route. (I do this within the PageRouteBuilder itself, that way I can just pass in the page like normal when pushing.) This swipedetector package might replace the GestureDetector, or I might even experiment with this swipe_back_detector specifically made for custom routes made with PageRouteBuilder (see example they give).

Adding quick walkthrough about the APP in flutter

I am new to flutter and I have created an Todo app, for that I want to add a quick guide once the the users opens the app for the first time after installation.
I have seen something like that in the ICICI mobile app, there once you installed it will give a you a quick tour about what all option you will get with a pointing arrow, below that its description and a next button, I want to do similar to that in my flutter application.
Can anyone who had implemented the same, or know about it , can you share the same.
Thanks
Here is the plugin named- feature_discovery which shows the app tour guide following the material design guidelines.
It's quite simple what all you need ::
Whole screen image including pointing arrow.
Your Button to go next and previous.
Connect all screens using navigation.
That's it,
Thanks.