Flutter Routes & Navigation - Parameters, Named Routes, onGenerateRoute

Поделиться
HTML-код
  • Опубликовано: 10 фев 2025
  • 📗 Learn from the written tutorial 👇👇
    resocoder.com/...
    👨‍💻 Do you write good code? Find out now 👇
    resocoder.com/...
    Routing is one of the most basic things your app must have to do anything meaningful. However, navigating between pages can quickly turn into a mess. It doesn't have to be so!
    There are multiple options for routing. Some create a lot of clutter, others cannot facilitate passing data between routes, and yet others require that you set up a third-party library. The option that you are going to learn about in this tutorial is the best of both worlds - first-party and yet clean to use.
    Go to my website for more information, code examples, and articles:
    ● resocoder.com
    Follow me on social media:
    ● / resocoder
    ● / resocoder
    ● / resocoder
    ● gab.ai/resocoder

Комментарии • 176

  • @donaldparkerii
    @donaldparkerii 5 лет назад +79

    another great tutorial, you've not only done a great job teaching but also at production standards coding, THANK YOU SO MUCH

    • @ResoCoder
      @ResoCoder  5 лет назад +4

      Thank YOU for watching!

  • @docdsmc6639
    @docdsmc6639 5 лет назад +20

    Awesome work! This is exactly what I needed to see. I was having a heck of a time trying to pass dynamic arguments to my pages for the past 2 days. This video not only showed me how to do it, it showed me why my previous efforts failed. Well done!

    • @Juliapak
      @Juliapak 2 года назад

      I'm having that issue right now!!

  • @DevGamer19
    @DevGamer19 5 лет назад +3

    This is indeed the best tutorial for Flutter Routing. Clean code and very good explanation. Thank you!

  • @officialismailshah
    @officialismailshah 3 года назад

    Man!!!!! You are blessing for flutter developers.... You are playing big rule in flutter community... Keep doing great stuff....

  • @golfgolf7161
    @golfgolf7161 Год назад +1

    The best video about navigation on youtube! Can you explain when use push, pushReplacement, pushAndRemoveUntil? GL

  • @coding_den
    @coding_den 3 года назад +2

    Probably the best explanation of basic routing in Flutter that I've seen 🙌🏼

  • @bm2ilabs
    @bm2ilabs 4 года назад

    As usual the first source to see if you are stuck in anything about flutter, i would really like to see all this knowledge in one big product it will be amazing , Thank you for everything

  • @mdmarcaassport
    @mdmarcaassport 4 года назад +4

    What a voice men.

  • @tadaspetra
    @tadaspetra 5 лет назад +14

    I think it would be important to mention that you would need to create a new "arguments" Object for every class that you want to pass multiple parameters to

  • @myrtasz1036
    @myrtasz1036 4 года назад +1

    Thanks, one of the best programming tutorials I've ever seen

  • @johnkaicher2073
    @johnkaicher2073 3 года назад

    Thanks... best explanation of onGenerate and Flutter routing on You Tube

  • @mdmarcaassport
    @mdmarcaassport 4 года назад +2

    Very good tutorial. In order to be excellent it may explain if the routes approach works on top of push/pop approach. E. G. /index to /second to /index is push and push or push and pop

  • @WESLEYNFSMW
    @WESLEYNFSMW 3 года назад

    Thanks bro, another sub from Brazil 😁

  • @allanjuan1149
    @allanjuan1149 5 лет назад +1

    Great tutorial. Clear, informative and straight to the point. Thanks a lot for sharing

  • @monadmantis7472
    @monadmantis7472 4 года назад

    your tutorials are awesome. I have liked this video and subscribed. you are a giant among men!

  • @ramioooz
    @ramioooz 5 лет назад +3

    Simple, nice and straightforward. great video pro 👍

  • @Vellutia
    @Vellutia 5 лет назад +14

    Oh no.. I miss this tutorial, my project is already like half done :'(

  • @akshaychopra96
    @akshaychopra96 3 года назад

    You are the best! Thanks for making flutter for complex apps so easy :)

  • @pravinromano8774
    @pravinromano8774 3 года назад

    thank you for the wonderful tutorial on page routes and navigation sir, thank you

  • @fakejimhalpert
    @fakejimhalpert 4 года назад

    Thank you very much, your tutorial is very great. It will help me a lot for my school project! :)

  • @AdriSinaga
    @AdriSinaga 5 лет назад +3

    Wow, your explaination so clear. Thank you

  • @a.d7627
    @a.d7627 3 года назад

    Great tutorial! thanks for opening my routes horizons :)

  • @zaytoons
    @zaytoons 5 лет назад

    Thank you so much! Exactly what I was looking for. Keep up the good work! 👍🏻

  • @AVACLOUDADDA
    @AVACLOUDADDA 4 года назад

    Great tutorial. It clears my all doubt.
    Thanks

  • @MubashirAR
    @MubashirAR 3 года назад +1

    For anyone using flutter for web,
    replace
    final args = settings.arguments;
    with
    final name = settings.name;
    and
    switch(args)
    with
    switch (name)

  • @ivan.arenas
    @ivan.arenas 4 года назад

    muchas gracias !! !! ! !! !! !! !!! saludos desde colombia

  • @liorpolak1391
    @liorpolak1391 3 года назад

    Outstanding tutorial!

  • @shivkumar7496
    @shivkumar7496 4 года назад

    Thanks a lot...u explained so well, u saved my time by explaining routing clearly.

  • @kennyho6222
    @kennyho6222 3 года назад

    This is great. thank you!

  • @FilledStacks
    @FilledStacks 5 лет назад +1

    Very helpful tutorial. Thanks for the video.

  • @johncerpa3782
    @johncerpa3782 4 года назад

    Great video, man. Thank you so much

  • @bluecodes5881
    @bluecodes5881 4 года назад

    Thanks for such an awesome tutorial!

  • @mihirmodi1936
    @mihirmodi1936 3 года назад

    Excellent explanation. Loved it. Thanks.

  • @aravind.a
    @aravind.a 4 года назад

    Really awesome tutorial on flutter navigation 👍🎉🔥

  • @mateenmehmood5675
    @mateenmehmood5675 2 года назад

    Awesome Content. Incredible

  • @shivampokhriyal_
    @shivampokhriyal_ 4 года назад +1

    Great tut on Routes :D

  • @murtazavohra360
    @murtazavohra360 4 года назад

    This is exactly the video I needed Thanks!!

  • @iced87
    @iced87 4 года назад +1

    so, I applied what you did in this video and it works flawlessly; however, I am currently facing an issue with using popUntil

  • @fixocsolutions2695
    @fixocsolutions2695 4 года назад

    thanks bro helped a lot

  • @rasan97
    @rasan97 2 года назад

    Thank you, kind sir.

  • @brianmartindunn
    @brianmartindunn 4 года назад +7

    If I wanted to pass multiple named parameters, is there a way to do that? It sounds like all the parameters would need to get packed into a Map and sent in the "arguments" parameter. It would be nice if the calling widget ("First Page" in your example) could see the list of parameters expected by the second widget ("Second Page" in your example). Is there a trick or technique that can achieve this?
    BTW, great tutorial! Please keep making them.

    • @Iamnooralibutt
      @Iamnooralibutt 4 года назад

      Map or make a class of arguments

    • @BartWentink
      @BartWentink 4 года назад

      @@Iamnooralibutt I'm trying to pass a map, but I get an error that I can't use arguments of type in place of int. How would I rectify this?

  • @RossiMurilo
    @RossiMurilo 5 лет назад

    Pretty clear! Thanks a lot!

  •  3 года назад +1

    great tutorial! one thing though: the error page example is a little artificial, if an argument is of a wrong type, you rather want an early error as it is a bug, the error page would mask this. also a class with a singe static function is still just a function, it doesn’t really matter where you put it.

  • @AhtramTube
    @AhtramTube 4 года назад

    Great tutorial! Thank you!

  • @aytunch
    @aytunch 5 лет назад +8

    Hi Matej, Thanks for bringing this subject up. It cleared a lot of confusions for us:) One request. Can you make a followup video on how we would pass data back when popping the page or multiple nested pages? And How would we manage a nested Page tree situation where we can go from a->b->c or a->c directly and from c->b->a or c->a directly. Should we do a scenario like this using bloc?

    • @dimitristotsios2292
      @dimitristotsios2292 5 лет назад

      flutter.dev/docs/cookbook/navigation/returning-data#nope-button see the answers here as a start point.

  • @aguninghamidou9969
    @aguninghamidou9969 4 года назад

    very good tutorial

  • @vfthome-yt
    @vfthome-yt Год назад

    Thank you!

  • @dewas6237
    @dewas6237 5 лет назад

    your channel so help me a lot thanks bro!

  • @danielduvana
    @danielduvana 4 года назад

    This was a perfect tutorial! Thanks!

  • @csgokul
    @csgokul 4 года назад

    Just wow .... Thanks for this awesome tut ...

  • @ThomazMartinez
    @ThomazMartinez Год назад +1

    After 4 years is this still best?

  • @Ishaahmed1687
    @Ishaahmed1687 3 года назад

    great tutorial.. Thanks...........

  • @Makayasa
    @Makayasa 5 лет назад +1

    Well prepared tutorial, love your teching method

  • @abdechahidihya5360
    @abdechahidihya5360 4 года назад

    I love you man.

  • @BillyMahmood
    @BillyMahmood 5 лет назад +2

    Great tutorial, please can you show us how to add route guards?

  • @jmbartho1
    @jmbartho1 5 лет назад

    Great video thanks!

  • @shashanksm6327
    @shashanksm6327 3 года назад

    Great videos , keep up the good work :)

  • @riyoua
    @riyoua 5 лет назад

    Great Tutorial ... thanks a lot

  • @the_one_named_harris
    @the_one_named_harris 5 лет назад

    Very helpful video! Thanks a lot!

  • @brunopereira9905
    @brunopereira9905 5 лет назад

    Very nice tutorial man! Helped me a looot.

  • @Hkp-z9x
    @Hkp-z9x 5 лет назад

    Awesome tutorial. You explained it so well.

  • @chrisp267
    @chrisp267 5 лет назад

    Great stuff! Thanks!

  • @FranciscoJunior29
    @FranciscoJunior29 5 лет назад

    Great! Thank you!

  • @JM-ip9fe
    @JM-ip9fe 4 года назад +1

    Cool

  • @sephyshen2510
    @sephyshen2510 5 лет назад

    very helpful video. thank you RC.

  • @syedmuheeb2409
    @syedmuheeb2409 4 года назад +1

    Can u show this in future builder which returns list view builder binder with json data when one list tile is tapped it should return the details page of that particular parent item!

  • @bioscopetales
    @bioscopetales 2 года назад

    Thanks buddy

  • @Luca-re3ve
    @Luca-re3ve 3 года назад

    very good tutorial, how should i proceed if i have first page and second in 2 different files?

  • @sanathnherath
    @sanathnherath 5 лет назад

    very helpful, thanks

  • @MrLefteris3000
    @MrLefteris3000 2 года назад

    Hello, Great tutorial!!!
    I am using the first method you explained in your video, the problem is I want to pass a List of names, how would i do that? thanks in advance!!!

  • @chiragsolanki8864
    @chiragsolanki8864 3 года назад

    Nice Explanation Brother,
    One Small question by using this approach how we can get data back from next screen.
    e.g If I want to get some data in first screen while user come back from next screen.

  • @Adam-xr6fj
    @Adam-xr6fj 4 года назад +3

    How can this technique be used with BottomNavigationBar?

  • @rammehar5531
    @rammehar5531 3 года назад

    Hi, please make a video on Navigator 2.0 with real world example! It will be highly appreciated

  • @lindermannla
    @lindermannla 5 лет назад

    Greate tutorial! Thnxz!

  • @mahmudulhasanfarhan156
    @mahmudulhasanfarhan156 2 года назад

    Awesome tutorial. But I have one question, If I want to access the second page by typing the URL on the browser (not by clicking on the Button), how to write the route name and pass the arguments?

  • @brunofrancosentis5148
    @brunofrancosentis5148 2 года назад

    thanks!

  • @adnankazi9572
    @adnankazi9572 5 лет назад +2

    Perfect video just wanted to know how to i use Navigator.popUntil(context,pageRoute) using this method i am getting error

  • @IreshDissanayakaM
    @IreshDissanayakaM 5 лет назад

    thank you!

  • @paulohenriquepereiraolivei5510
    @paulohenriquepereiraolivei5510 5 лет назад

    Very nice

  • @ayushpgupta6243
    @ayushpgupta6243 5 лет назад

    Easiest to understand routing

  • @DelcoDan79
    @DelcoDan79 5 лет назад

    Awesome thanks

  • @kubecon
    @kubecon 4 года назад

    I like your VS Code theme and font. Mind sharing it. 😊

  • @ricksondpenha
    @ricksondpenha 4 года назад

    Hi can you make a video on navigator 2.0...

  • @eron.amorim
    @eron.amorim 4 года назад +2

    Great tutorial! Just one question... If my add do have 3 or more pages, it'll be '/second/third' or just '/third' ??

  • @341414
    @341414 5 лет назад

    Thank you for this beautiful video training. What'ss about onUnknownRoute?

  • @cholasimmons
    @cholasimmons 4 года назад

    you sound like such a smooth operator! Making thousands of people watch your channel while you traffic drugs in your videos 😂

  • @altevircneto
    @altevircneto 5 лет назад

    awesome!

  • @vathnadev5570
    @vathnadev5570 5 лет назад

    Nice!

  • @balaganesh3440
    @balaganesh3440 5 лет назад

    Awesome...

  • @WorstDeveloper
    @WorstDeveloper 5 лет назад

    This was really helpful. I will implement it in my application. Is this way still the recommended approach?

  • @angelofopa
    @angelofopa 4 года назад

    Thanks

  • @FranzSchwanauer
    @FranzSchwanauer 5 лет назад

    Thank you for your flutter tutorials. They are helpful.
    How do you implement popUntil to get to HOME no matter how many routes are on the navigation stack.
    Please respond with example code.

  • @user-mz4kk7ry2v
    @user-mz4kk7ry2v 5 лет назад

    thank you :)

  • @harrazmasri2805
    @harrazmasri2805 Год назад

    awesome

  • @KittehBit
    @KittehBit 5 лет назад +1

    Love the tutorial and also your font and color scheme for VSCode!
    Could you share what font and color thing that is? :3

  • @peekpt
    @peekpt 5 лет назад

    Nice! Tks

  • @Magarovv
    @Magarovv 4 года назад

    What is your extension of theme? please... I thinked so beautiful

  • @ecarlosbc
    @ecarlosbc 3 года назад

    Worked perfect for me, but i had to cast the variable args to pass values to the screen: final args = settings.arguments as Map;

  • @holaahora7527
    @holaahora7527 3 года назад

    And how can I do to pass multiple data? Or even a custom class that I created? Thanks!

  • @abhishekbedi1432
    @abhishekbedi1432 3 года назад

    Excellent tute! Is it possible to pass the dynamic params from platforms like iOS-like FlutterViewController.swift?