Sync URL with Navigator 2.0 in Flutter Web Project | i tried my best...

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 ต.ค. 2024

ความคิดเห็น • 43

  • @cristyshorasd
    @cristyshorasd 3 ปีที่แล้ว +6

    This video should be added to the original article as "more information". I was not fully understanding the article but then I found this video and now every thing is clear. Thanks and keep up with your work!

  • @pradeep422
    @pradeep422 4 ปีที่แล้ว +2

    the best nav 2.0 tut untill today....ur the best...

  • @paulgibson7202
    @paulgibson7202 3 ปีที่แล้ว

    Brilliant Tutorial. Navigator 2.0 is very complicated but you explain it well, thank you.

  • @honfey
    @honfey 3 ปีที่แล้ว +4

    I wanna develop a flutter web and make it like normal websites to use URL to pass some information, e.g: id=1&type=B&status=pending, Navigator 2.0 can do that? It seems very complicated, any better alternative?

  • @prathamjaiswal2512
    @prathamjaiswal2512 2 ปีที่แล้ว

    Very well explained
    Thanks

  • @MovieSocial
    @MovieSocial 4 ปีที่แล้ว +4

    Thanks for the video. So far no tutorial has shown how well this will work with more than 2 to 3 pages. Do you have any ideas?

    • @LearnFlutterCode
      @LearnFlutterCode  4 ปีที่แล้ว +1

      what do you mean by more than 2 to 3 pages? Do you mean, for example, 3 pages like home, settings, and book details page?

    • @MovieSocial
      @MovieSocial 4 ปีที่แล้ว

      @@LearnFlutterCode yes I did see it is possible but with nesting but it seams pointless do you think you will do a video on it?

  • @sonxuannguyen1207
    @sonxuannguyen1207 3 ปีที่แล้ว +1

    Is it possible to implement deep-linking without Navigator 2.0?

  • @Shariar420
    @Shariar420 3 ปีที่แล้ว +1

    i am trying to develop an office management system where i need to go detail page most of the time. So do i have to write this routing codes for every models repeatedly(In this case you wrote only for book and it's detail page)? Is there any common global way where i can send id to the url for different model detail pages(i.e book-detail, employee-detail, client-detail, etc)?

  • @calvinalfredo
    @calvinalfredo 2 ปีที่แล้ว

    I just started learning flutter and this is still by far the best tutorial for navigator 2.0 in my opinion. I have a question though, is it possible to use nested navigators to switch between pages using this approach? By the way I see it, since we're using MaterialApp.router to setup the navigator initially, I'm quite confused on how to setup another MaterialApp.router inside the existing MaterialApp.router to handle separate state for the nested pages (in my case pages that are stored inside each navigation bar if for say, I have a bottom navigation bar inside my web app).

  • @rydmike
    @rydmike 4 ปีที่แล้ว +1

    Thanks, really nice tutorial on Web navigation with Flutter Navigator 2.0, but gosh feels quite verbose and complicated. I am sure there will be a lot of opportunity to create packages thar simplifies it. And as mentioned some packages already manages to deal with Web navigation using Nav 1, and they are a lot simpler than this. Still I am going to give this a trial run in test project as well. Very nice video though! 👍🏻💙

  • @shazitechs8382
    @shazitechs8382 2 ปีที่แล้ว

    Does navigating back and forth after a page refresh works with it?

  • @ExylonTeam
    @ExylonTeam 4 ปีที่แล้ว +1

    Is there any way to put async guards to the routes? To prevent unauthentificated users to reach a route?

    • @LearnFlutterCode
      @LearnFlutterCode  4 ปีที่แล้ว +1

      You can have a future or stream provider at the top of your widget tree and listen to the auth service, and pass down to your widgets

  • @farizamohsin4039
    @farizamohsin4039 ปีที่แล้ว

    I have a question!! How can we open every page in new tab in flutter web? Is this possible??

  • @mohammadzarkasi
    @mohammadzarkasi 4 ปีที่แล้ว +1

    very good
    but, can it still compiled to native mobile app without any modification?

  • @AbhideepChakravarty
    @AbhideepChakravarty 3 ปีที่แล้ว

    Thank you for explaining it with so much of patience. But looking at the complications created by just having two pages (so many ifs and elses), I think its going to be a nightmare for a normal app. May be there is a cleaner way to code it, but certainly Flutter created a HUGE todo items just have navigation right.

    • @LearnFlutterCode
      @LearnFlutterCode  3 ปีที่แล้ว +1

      The new navigator gives finer control on how you want to show your screens, which explains the complexity. This is for sure not for beginners or simple apps.

    • @AbhideepChakravarty
      @AbhideepChakravarty 3 ปีที่แล้ว

      @@LearnFlutterCode This is my third day in Flutter and i am doing front end coding after 11 years. Your video helped. But I feel with the grown up app, things will be much more complex.

  • @yerimjang2897
    @yerimjang2897 4 ปีที่แล้ว +1

    Thanks for the good explanation.😊BTW it seems there is no transition animation between the pages even MaterialPageRoute is used. (which means it is supposed to have a slide animated transition.) Do you know the reason? I was trying to apply an animated transition between pages but it doesn't work even the MaterialPageRoute.

    • @LearnFlutterCode
      @LearnFlutterCode  4 ปีที่แล้ว +3

      You can extend the page to add in a PageRouteBuilder. Here is a code snippet: gist.github.com/johnpryan/6c32e848b0dc71bc07f7070a84383d23#file-nav2_snippet_5-dart

    • @yerimjang2897
      @yerimjang2897 4 ปีที่แล้ว

      ​@@LearnFlutterCode yes, I know how to extend but it doesn't work and neither does your code. Also, I have applied the code in the above link it is still not working. Your demo doesn't have any page transition animation, is what you intended?

    • @lucasdelsol1170
      @lucasdelsol1170 3 ปีที่แล้ว

      @@yerimjang2897 It's an issue with nested navigator. The issue is that the globalkey of the navigator changes, preventing it to animate its pages. The solution is to have global navigator keys

  • @t0ddu
    @t0ddu 3 ปีที่แล้ว

    i don't get it what's the deal with the current configuration and set new route, i mean what's called first because they seem to work in inverse order. current config basically takes your state variable and use them to set a BookRoutePath model and set new route take a BookRoutePath Model and then sets your state variable.

  • @ExtraServingsBTS
    @ExtraServingsBTS 4 ปีที่แล้ว

    ugh. well done. my hero.

  • @BooleanDev
    @BooleanDev 3 ปีที่แล้ว

    you should try this again with the Beamer package

  • @robertchan3037
    @robertchan3037 4 ปีที่แล้ว

    The app works well except pressing the browser's "back" button does not go back to the previous page (URL does change though). Could you please let me know how to fix that?
    I tested that in Chrome, and using master channel

    • @robertchan3037
      @robertchan3037 4 ปีที่แล้ว +1

      Update: Switched 1.22.3 (stable channel) works

  • @bluetim6848
    @bluetim6848 4 ปีที่แล้ว

    is the forward button on browser working after click back button?

  • @mshvsh
    @mshvsh 3 ปีที่แล้ว

    Great! Ty!

  • @pradeepg4498
    @pradeepg4498 ปีที่แล้ว

    How to clear browser history

  • @FlutterShipp
    @FlutterShipp 3 ปีที่แล้ว

    Love the content, but when exporting the video please increase the speed to 1.25x

  • @innovationsapps5601
    @innovationsapps5601 4 ปีที่แล้ว

    Thanks for this video, but Getx has friendly urls with browser history for over 1 year ago, when Flutter didn't even think about doing something like that, and it's much easier. I will continue with that, Navigator 2.0 is not something that will catch on, imagine applications with 30 screens using this? It doesn't seem viable to me.

    • @shazitechs8382
      @shazitechs8382 2 ปีที่แล้ว +1

      Navigating back and forth after a page refresh doesn't work with GetX

  • @LearnWithHibaNoor
    @LearnWithHibaNoor 4 ปีที่แล้ว

    @LearnFlutterCode please explain this nested routing to us which is demonstrated here: gist.github.com/johnpryan/bbca91e23bbb4d39247fa922533be7c9