Flutter Routes & Navigation - Parameters, Named Routes, onGenerateRoute

Sdílet
Vložit
  • čas přidán 26. 04. 2019
  • 📗 Learn from the written tutorial 👇👇
    resocoder.com/flutter-routes-...
    👨‍💻 Do you write good code? Find out now 👇
    resocoder.com/good-code-quiz
    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

Komentáře • 176

  • @donaldparkerii
    @donaldparkerii Před 4 lety +79

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

  • @DevGamer19
    @DevGamer19 Před 4 lety +3

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

  • @docdsmc6639
    @docdsmc6639 Před 4 lety +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 Před 2 lety

      I'm having that issue right now!!

  • @zaytoons
    @zaytoons Před 4 lety

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

  • @allanjuan1149
    @allanjuan1149 Před 4 lety +1

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

  • @myrtasz1036
    @myrtasz1036 Před 4 lety +1

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

  • @bm2ilabs
    @bm2ilabs Před 4 lety

    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

  • @officialismailshah
    @officialismailshah Před 2 lety

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

  • @ramioooz
    @ramioooz Před 5 lety +3

    Simple, nice and straightforward. great video pro 👍

  • @AdriSinaga
    @AdriSinaga Před 4 lety +3

    Wow, your explaination so clear. Thank you

  • @coding_den
    @coding_den Před 2 lety +2

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

  • @danielduvana
    @danielduvana Před 4 lety

    This was a perfect tutorial! Thanks!

  • @shivkumar7496
    @shivkumar7496 Před 4 lety

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

  • @akshaychopra96
    @akshaychopra96 Před 2 lety

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

  • @RossiMurilo
    @RossiMurilo Před 5 lety

    Pretty clear! Thanks a lot!

  • @murtazavohra360
    @murtazavohra360 Před 4 lety

    This is exactly the video I needed Thanks!!

  • @lunargixx6867
    @lunargixx6867 Před 5 lety

    Awesome tutorial. You explained it so well.

  • @the_one_named_harris
    @the_one_named_harris Před 5 lety

    Very helpful video! Thanks a lot!

  • @mdmarcaassport
    @mdmarcaassport Před 3 lety +4

    What a voice men.

  • @FilledStacks
    @FilledStacks Před 5 lety +1

    Very helpful tutorial. Thanks for the video.

  • @chrisp267
    @chrisp267 Před 5 lety

    Great stuff! Thanks!

  • @a.d7627
    @a.d7627 Před 3 lety

    Great tutorial! thanks for opening my routes horizons :)

  • @Makayasa
    @Makayasa Před 4 lety +1

    Well prepared tutorial, love your teching method

  • @KrySquiky
    @KrySquiky Před 3 lety

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

  • @AhtramTube
    @AhtramTube Před 4 lety

    Great tutorial! Thank you!

  • @bluecodes5881
    @bluecodes5881 Před 4 lety

    Thanks for such an awesome tutorial!

  • @FranciscoJunior29
    @FranciscoJunior29 Před 5 lety

    Great! Thank you!

  • @sephyshen2510
    @sephyshen2510 Před 5 lety

    very helpful video. thank you RC.

  • @mihirmodi1936
    @mihirmodi1936 Před 3 lety

    Excellent explanation. Loved it. Thanks.

  • @Vellutia
    @Vellutia Před 4 lety +14

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

  • @johncerpa3782
    @johncerpa3782 Před 3 lety

    Great video, man. Thank you so much

  • @dewas6237
    @dewas6237 Před 4 lety

    your channel so help me a lot thanks bro!

  • @liorpolak1391
    @liorpolak1391 Před 3 lety

    Outstanding tutorial!

  • @AVACLOUDADDA
    @AVACLOUDADDA Před 3 lety

    Great tutorial. It clears my all doubt.
    Thanks

  • @pravinromano8774
    @pravinromano8774 Před 3 lety

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

  • @sanathnherath
    @sanathnherath Před 5 lety

    very helpful, thanks

  • @lindermannla
    @lindermannla Před 5 lety

    Greate tutorial! Thnxz!

  • @monadmantis7472
    @monadmantis7472 Před 3 lety

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

  • @shivampokhriyal_
    @shivampokhriyal_ Před 4 lety +1

    Great tut on Routes :D

  • @johnkaicher2073
    @johnkaicher2073 Před 2 lety

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

  • @jmbartho1
    @jmbartho1 Před 4 lety

    Great video thanks!

  • @csgokul
    @csgokul Před 4 lety

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

  • @mdmarcaassport
    @mdmarcaassport Před 3 lety +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

  • @VitorFThome
    @VitorFThome Před rokem

    Thank you!

  • @tadaspetra
    @tadaspetra Před 4 lety +13

    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

  • @kennyho6222
    @kennyho6222 Před 2 lety

    This is great. thank you!

  • @IreshDissanayakaM
    @IreshDissanayakaM Před 5 lety

    thank you!

  • @riyoua
    @riyoua Před 4 lety

    Great Tutorial ... thanks a lot

  • @BillyMahmood
    @BillyMahmood Před 5 lety +2

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

  • @WorstDeveloper
    @WorstDeveloper Před 4 lety

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

  • @rasan97
    @rasan97 Před 2 lety

    Thank you, kind sir.

  • @MycoDan
    @MycoDan Před 5 lety

    Awesome thanks

  • @aravind.a
    @aravind.a Před 3 lety

    Really awesome tutorial on flutter navigation 👍🎉🔥

  • @WESLEYNFSMW
    @WESLEYNFSMW Před 3 lety

    Thanks bro, another sub from Brazil 😁

  • @mateenmehmood5675
    @mateenmehmood5675 Před 2 lety

    Awesome Content. Incredible

  • @fixocsolutions2695
    @fixocsolutions2695 Před 3 lety

    thanks bro helped a lot

  • @shashanksm6327
    @shashanksm6327 Před 3 lety

    Great videos , keep up the good work :)

  • @user-mz4kk7ry2v
    @user-mz4kk7ry2v Před 5 lety

    thank you :)

  • @munasikder1548
    @munasikder1548 Před 2 lety

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

  • @aguninghamidou9969
    @aguninghamidou9969 Před 3 lety

    very good tutorial

  • @animesgeekbr
    @animesgeekbr Před 5 lety

    awesome!

  • @iced87
    @iced87 Před 4 lety +1

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

  • @golfgolf7161
    @golfgolf7161 Před rokem

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

  • @ivan.arenas
    @ivan.arenas Před 4 lety

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

  • @341414
    @341414 Před 4 lety

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

  • @abdechahidihya5360
    @abdechahidihya5360 Před 4 lety

    I love you man.

  • @bioscopetales
    @bioscopetales Před 2 lety

    Thanks buddy

  • @brunofrancosentis5148
    @brunofrancosentis5148 Před 2 lety

    thanks!

  • @vathnadev5570
    @vathnadev5570 Před 5 lety

    Nice!

  • @FranzSchwanauer
    @FranzSchwanauer Před 4 lety

    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.

  • @balaganesh3440
    @balaganesh3440 Před 4 lety

    Awesome...

  • @angelofopa
    @angelofopa Před 4 lety

    Thanks

  • @paulohenriquepereiraolivei5510

    Very nice

  • @brunopereira9905
    @brunopereira9905 Před 5 lety

    Very nice tutorial man! Helped me a looot.

  • @peekpt
    @peekpt Před 5 lety

    Nice! Tks

  • @harrazmasri2805
    @harrazmasri2805 Před rokem

    awesome

  • @Blackday2010
    @Blackday2010 Před 4 lety

    In the code of (RouteGenerator) when define final args= settings.arguments
    I found that it doesn't have arguments but has only (name, isIntializable), what is wrong?

  • @syedmuheeb2409
    @syedmuheeb2409 Před 3 lety +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!

  • @UnSet
    @UnSet Před 3 lety

    muito bom

  • @aytunch
    @aytunch Před 5 lety +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 Před 5 lety

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

  • @Luca-re3ve
    @Luca-re3ve Před 2 lety

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

  • @ricksondpenha
    @ricksondpenha Před 3 lety

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

  • @MrLefteris3000
    @MrLefteris3000 Před 2 lety

    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!!!

  • @brianmartindunn
    @brianmartindunn Před 3 lety +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.

    • @nooralibutt2690
      @nooralibutt2690 Před 3 lety

      Map or make a class of arguments

    • @BartWentink
      @BartWentink Před 3 lety

      @@nooralibutt2690 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?

  • @JM-ip9fe
    @JM-ip9fe Před 3 lety +1

    Cool

  • @Adam-xr6fj
    @Adam-xr6fj Před 4 lety +3

    How can this technique be used with BottomNavigationBar?

  • @eron.amorim
    @eron.amorim Před 4 lety +2

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

  • @KittehBit
    @KittehBit Před 4 lety +1

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

  • @abhishekbedi1432
    @abhishekbedi1432 Před 3 lety

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

  • @kalderDean
    @kalderDean Před 4 lety

    Thaaaaaaaankssssss

  • @adnankazi9572
    @adnankazi9572 Před 4 lety +2

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

  • @chiragsolanki8864
    @chiragsolanki8864 Před 2 lety

    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.

  • @holaahora7527
    @holaahora7527 Před 3 lety

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

  • @MubashirAR
    @MubashirAR Před 3 lety +1

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

  • @mahmudulhasanfarhan156

    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?

  • @thamastersmooth
    @thamastersmooth Před 3 lety

    what if I want to return a list on the second page by button?

  • @rammehar5531
    @rammehar5531 Před 3 lety

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

  • @imransefat8770
    @imransefat8770 Před 3 lety

    what about multiple types of arguments?

  • @learnwithkhubbaib
    @learnwithkhubbaib Před 3 lety

    how we can pass multiple data, like i want to send matchId.seriesId for same route

  • @bgizzanm
    @bgizzanm Před 2 lety

    but, how implement .pushNamed in the attribute onTap from ListTile?