Flutter Routes & Navigation - Parameters, Named Routes, onGenerateRoute

Поділитися
Вставка
  • Опубліковано 29 лис 2024

КОМЕНТАРІ • 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!

  • @officialismailshah
    @officialismailshah 2 роки тому

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

  • @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 4 роки тому +3

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

  • @coding_den
    @coding_den 2 роки тому +2

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

  • @tadaspetra
    @tadaspetra 4 роки тому +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

  • @mdmarcaassport
    @mdmarcaassport 3 роки тому +4

    What a voice men.

  • @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

  • @myrtasz1036
    @myrtasz1036 4 роки тому +1

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

  • @mdmarcaassport
    @mdmarcaassport 3 роки тому +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

  • @johnkaicher2073
    @johnkaicher2073 2 роки тому

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

  • @WESLEYNFSMW
    @WESLEYNFSMW 3 роки тому

    Thanks bro, another sub from Brazil 😁

  • @golfgolf7161
    @golfgolf7161 Рік тому

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

  • @ramioooz
    @ramioooz 5 років тому +3

    Simple, nice and straightforward. great video pro 👍

  • @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)

  • @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

  • @AdriSinaga
    @AdriSinaga 4 роки тому +3

    Wow, your explaination so clear. Thank you

  • @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 :)

  • @monadmantis7472
    @monadmantis7472 4 роки тому

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

  • @liorpolak1391
    @liorpolak1391 3 роки тому

    Outstanding tutorial!

  • @allanjuan1149
    @allanjuan1149 4 роки тому +1

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

  • @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 3 роки тому

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

  • @ivan.arenas
    @ivan.arenas 4 роки тому

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

  • @AVACLOUDADDA
    @AVACLOUDADDA 4 роки тому

    Great tutorial. It clears my all doubt.
    Thanks

  • @aytunch
    @aytunch 5 років тому +7

    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.

  • @FilledStacks
    @FilledStacks 5 років тому +1

    Very helpful tutorial. Thanks for the video.

  • @mihirmodi1936
    @mihirmodi1936 3 роки тому

    Excellent explanation. Loved it. Thanks.

  •  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.

  • @pravinromano8774
    @pravinromano8774 3 роки тому

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

  • @mateenmehmood5675
    @mateenmehmood5675 2 роки тому

    Awesome Content. Incredible

  • @a.d7627
    @a.d7627 3 роки тому

    Great tutorial! thanks for opening my routes horizons :)

  • @kennyho6222
    @kennyho6222 2 роки тому

    This is great. thank you!

  • @shivkumar7496
    @shivkumar7496 4 роки тому

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

  • @Adam-xr6fj
    @Adam-xr6fj 4 роки тому +3

    How can this technique be used with BottomNavigationBar?

  • @shivampokhriyal_
    @shivampokhriyal_ 4 роки тому +1

    Great tut on Routes :D

  • @fakejimhalpert
    @fakejimhalpert 4 роки тому

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

  • @aravind.a
    @aravind.a 3 роки тому

    Really awesome tutorial on flutter navigation 👍🎉🔥

  • @bluecodes5881
    @bluecodes5881 4 роки тому

    Thanks for such an awesome tutorial!

  • @csgokul
    @csgokul 4 роки тому

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

  • @johncerpa3782
    @johncerpa3782 4 роки тому

    Great video, man. Thank you so much

  • @aguninghamidou9969
    @aguninghamidou9969 3 роки тому

    very good tutorial

  • @AhtramTube
    @AhtramTube 4 роки тому

    Great tutorial! Thank you!

  • @murtazavohra360
    @murtazavohra360 4 роки тому

    This is exactly the video I needed Thanks!!

  • @RossiMurilo
    @RossiMurilo 5 років тому

    Pretty clear! Thanks a lot!

  • @fixocsolutions2695
    @fixocsolutions2695 4 роки тому

    thanks bro helped a lot

  • @vfthome-yt
    @vfthome-yt Рік тому

    Thank you!

  • @danielduvana
    @danielduvana 4 роки тому

    This was a perfect tutorial! Thanks!

  • @munasikder1548
    @munasikder1548 3 роки тому

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

  • @Makayasa
    @Makayasa 4 роки тому +1

    Well prepared tutorial, love your teching method

  • @rasan97
    @rasan97 2 роки тому

    Thank you, kind sir.

  • @zaytoons
    @zaytoons 5 років тому

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

  • @abdechahidihya5360
    @abdechahidihya5360 4 роки тому

    I love you man.

  • @pikachucod
    @pikachucod 5 років тому

    Awesome tutorial. You explained it so well.

  • @the_one_named_harris
    @the_one_named_harris 5 років тому

    Very helpful video! Thanks a lot!

  • @ThomazMartinez
    @ThomazMartinez Рік тому +1

    After 4 years is this still best?

  • @chiragsolanki8864
    @chiragsolanki8864 2 роки тому

    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.

  • @BillyMahmood
    @BillyMahmood 5 років тому +2

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

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

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

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

  • @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' ??

  • @brunopereira9905
    @brunopereira9905 5 років тому

    Very nice tutorial man! Helped me a looot.

  • @riyoua
    @riyoua 4 роки тому

    Great Tutorial ... thanks a lot

  • @jmbartho1
    @jmbartho1 4 роки тому

    Great video thanks!

  • @dewas6237
    @dewas6237 4 роки тому

    your channel so help me a lot thanks bro!

  • @WorstDeveloper
    @WorstDeveloper 4 роки тому

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

  • @chrisp267
    @chrisp267 5 років тому

    Great stuff! Thanks!

  • @Luca-re3ve
    @Luca-re3ve 2 роки тому

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

  • @shashanksm6327
    @shashanksm6327 3 роки тому

    Great videos , keep up the good work :)

  • @bioscopetales
    @bioscopetales 2 роки тому

    Thanks buddy

  • @FranciscoJunior29
    @FranciscoJunior29 5 років тому

    Great! Thank you!

  • @imransefat8770
    @imransefat8770 3 роки тому

    what about multiple types of arguments?

  • @sephyshen2510
    @sephyshen2510 5 років тому

    very helpful video. thank you RC.

  • @ricksondpenha
    @ricksondpenha 4 роки тому

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

  • @adnankazi9572
    @adnankazi9572 4 роки тому +2

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

  • @Magarovv
    @Magarovv 4 роки тому

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

  • @free_intertaining
    @free_intertaining Рік тому

    what about web? suppose i have login and home page i want to check if the user hasn't been logged in show them login page other wise show home page, so every time when i refresh the page it goes to initialRoute no matter what happened before. what should i do?

  • @holaahora7527
    @holaahora7527 3 роки тому

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

  • @ayushpgupta6243
    @ayushpgupta6243 5 років тому

    Easiest to understand routing

  • @sanathnherath
    @sanathnherath 5 років тому

    very helpful, thanks

  • @brunofrancosentis5148
    @brunofrancosentis5148 2 роки тому

    thanks!

  • @bgizzanm
    @bgizzanm 2 роки тому

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

  • @realsk8ilsh
    @realsk8ilsh 4 роки тому

    Is it possible to pass multiple arguments on Second Page ... ?

  • @angelofopa
    @angelofopa 4 роки тому

    Thanks

  • @thamastersmooth
    @thamastersmooth 3 роки тому

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

  • @FranzSchwanauer
    @FranzSchwanauer 4 роки тому

    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.

  • @341414
    @341414 4 роки тому

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

  • @JM-ip9fe
    @JM-ip9fe 4 роки тому +1

    Cool

  • @davidagyakwa288
    @davidagyakwa288 4 роки тому

    does this mean i can use pop and popUnitl routes

  • @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;

  • @learnwithkhubbaib
    @learnwithkhubbaib 4 роки тому

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

  • @lindermannla
    @lindermannla 5 років тому

    Greate tutorial! Thnxz!

  • @AzeUnkn0wn
    @AzeUnkn0wn 4 роки тому

    how do you pass data from multiple variables?

  • @rammehar5531
    @rammehar5531 3 роки тому

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

  • @IreshDissanayakaM
    @IreshDissanayakaM 5 років тому

    thank you!

  • @slimefunoriginal
    @slimefunoriginal 3 роки тому

    sir, is it working on web?

  • @bennguyen1313
    @bennguyen1313 4 роки тому

    Total rookie here.. what does the (_) mean? For example you used it in the line: "secondPage' : (_) => SecondPage (data: 'abc', )" and "return MaterialPageRoute (builder: (_) => FirstPage() ); " Would any basic Dart book help with this kind of stuff?
    Also, in the MyApp class' build, are the "initialRoute" and "onGenerateRoute" members always available, even if you don't use routes? For example, I don't see how 'initalRoute' gets passed to onGenerateRoute.. does it act like a global variable?
    Would the use of Routes/RouteGenerator be an alternative to BlocBuilder / StreamBuilder, or are they commonly used together?

  • @TheHiHiker
    @TheHiHiker 5 років тому

    Awesome thanks

  • @paulohenriquepereiraolivei5510
    @paulohenriquepereiraolivei5510 4 роки тому

    Very nice