Declarative Routing with GoRouter 5 (Flutter)
HTML-код
- Опубликовано: 2 июн 2024
- GoRouter is a declarative routing package for Flutter, and in this video, you'll learn how to use it with a simple step-by-step Flutter example.
🚀 Learn Flutter / Build Apps 👇
📖 Courses • www.atomsbox.com/courses
✍ Templates • www.atomsbox.com/templates
🧑💻 Bespoke app dev • www.atomsbox.com/develop
💾 GitHub • www.github.com/maxonflutter
00:00 What is GoRouter?
00:26 Boilerplate code walkthrough
03:20 What are top-level routes and sub-routes in GoRouter?
03:40 GoRouter: context.go vs context.push?
04:50 Navigate across screens with paths and URLs
06:30 Navigate across screens with GoRouter named routes
08:10 What are GoRouter parameters and query parameters?
15:05 What are GoRouter redirects and guards?
This package uses the Flutter framework's Router API to provide a convenient, URL-based API for navigating between different screens. You can define URL patterns, navigate using a URL, handle deep links, and several other navigation-related scenarios. - Наука
🚀Learn Flutter / Build Apps 👇
📖📱Courses • www.atomsbox.com/courses
✍📱Templates • www.atomsbox.com/templates
🧑💻📱Bespoke app dev • www.atomsbox.com/develop
I just started using Go Router for the first time, leaving GetX currently. This video was perfect for getting me setup on navigation. Thank you for sharing Max.
This is very great. Thanks a lot.👍
This is great, thank you!
Thanks so much, you saved my life man
Hi Max, thank you for the tutorial, I just wanted to ask a question relating to your VS Code settings, how are you getting runtime errors to pop up on the editor like that, that is so convenient
This is great, thank you! ♥♥♥♥♥
well explained thanks
I have already done this, it's working well but i need to let the user go to the register page which been added after the redirection, could you please help, i'm using almost the same code as you without the cubit because i have a function who handles it ty
Help I don’t know how to use the app my dad bought all the plugin s how do u use the app??
❓How do you set up navigation and routing in your Flutter apps? Let me know in the comments ⬇
Flutter Dating App - Models for User Match, Message and Chat - EP6 - The Dating App Series. hello sir i want this dating app source code can u pls me an and also i am ur subscriber
How can i rebuild page when i use context.go or context.pop ? I use provider but refersh is not working.
Use context.push
How are you able to use context.go method without getting the error: The method 'go' isn't defined for the class 'BuildContext'
Have you importer go_router as a dependency in the file?
@@MaxonFlutter Done that, its working now, thanks
also when do we know when to use params: ? and when to use queryParams: ? I got confuse by those 2
Did you figure out when to use one or the other? Thanks!
How to return data on pop?
Brother please inform me about great platform through which I learn full flatter app development.I want to make chat and finance and crypto wallet apps can flutter do it.Please I hope I get answer please
youtube is a good resource
Flutter is bullshit man learn web dev and progressive web apps
@@nested9301 it’s good for admin dashboards
Sir how to remove all screens from stack (push named and remove until) in go router
❤ from PAKISTAN
Routing doesn't work in production when i type manually in the address bar, also when i refresh its show me page not found but in debug mode works fine everything any idea what's the issue.
You can check after deployment.
Can you tell me more about your specific issue?
@@MaxonFlutter Sure
1.) Like when I add a Go router in Flutter Web App, after running in debug mode I can type manually the route name in the address bar it's working fine in debug, release, and profile mode in development time.
2.) But when I Deployed my web app on Firebase, cloud anywhere live on the internet then I typed route name it show me page not found.
I3.) don't see any specific solution related to these questions on the internet.
@@omprakashchauhan970 I see, it should work fine on Flutter Web, too. I've deployed atomsbox.com and it uses GoRouter for navigation without any issue.
Can you make an example with one of your routes, adding the GoRoute class that you have in your app, and as well the URL you're typing in the address bar.
@@MaxonFlutter could you please share any web example any open source project it will help me a lot and many others 😊😊
can you make an updated video
24:26 your GoRouterRefreshStream seems more like a hack are you sure the is no better way ? :)
Did you find any better solution? Any other approach to convert the bloc stream into a listenable would work.
What is cubit???
Please make go router with bloc tutorial max
I will release a new series of videos soon with an app build using the BLoC pattern and go router!
How to check previous route ?
What do you mean?
Back press
Using constructor to find previous route
Please can you make a Slow movie app building with flutter .Because am A beginner
Hi there! Have you watched the movie ui video I have prepared already ?
bang github nya apa
context.go is not working in my case
For me also not working
Flutter: App keeps going back to root route on hot reload
please send github repo for this
I've had for now a pretty bad experience with this package. For me, animation transitions are extremely important but they don't seem to work the right way with go_router
Why?
@@programingtales7514 Because it reloads your state everytime you navigate to your page, which is unconvenient for user experience
And the animations are kinda weird but maybe it is bc i'm using bloc
please write your github
Hi, please, help me:
I can't go back to the previous page if I navigated with onTap in inkwell or onTap in gesturedetector. only works with onpressed in button
console:
══╡ EXCEPTION CAUGHT BY SCHEDULER LIBRARY ╞═════════════════════════════════════════════════════════
js_primitives.dart:30 The following assertion was thrown during a scheduler callback:
js_primitives.dart:30 Assertion failed: org-dartlang-sdk:///flutter_web_sdk/lib/_engine/engine/embedder.dart:514:12
js_primitives.dart:30 element.parentNode == _resourcesHost
js_primitives.dart:30 is not true