How to use Flutter Navigator 2.0? | Warning: it's complicated

Поделиться
HTML-код
  • Опубликовано: 26 ноя 2024

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

  • @kumarvishalben
    @kumarvishalben 3 года назад +16

    0:35 Forking ohh.... Okay

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

    Thanks for this simple and approachable intro to Nav2.
    As noticed and commented, it is a lot of boilerplate indeed. Reason for that is to enable building navigators for much more complicated cases.
    For basic stack push/pop and its named variant, Nav1 or packages based on it to even simplify it (eg autoroute, fluro, get) are still very good alternatives. I am looking forward to seeing packages that make using Nav2 simpler and less boilerplaty for some specific more advanced use cases, often related to Web and Desktop navigation and their seamless transition to phone sized navigation. Not only url handling, but eg inserting master/child view page as poppable page when you resize the screen to phone size. Totally doable now that you can easily control the page stack.

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

      No problem. It is a lot of boilerplate. And I would agree that it is for more complicated cases

  • @chordfunc3072
    @chordfunc3072 3 года назад +5

    Not a fan of how most people do navigation... I tend to hide the navigation logic inside the page you are navigating to
    So when navigating I just call a async handler:
    final result = await BookPage.navigate(context,book);
    Then I can handle the result of the popped page in a linear fashion. I think people are overcomplicating navigation...
    Thanks for the video, nice introduction to the new navigator

  • @essli9430
    @essli9430 6 месяцев назад

    Bro you have a such great personality and your explanation is on the point and made the things so easy to be absorbed
    thanks bro

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

    I thumb up because it is easy to follow as a basic introduction to Navigator 2.0
    The best moment is when he says: "Personally, I don't know exactly what onPopPage does". 😀
    That comment tells how messy is the new Navigator API.

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

      if you press a "BackButton" an event gets triggered to pop the current page. You can use that function to e.g. reload something.

  • @toplevelracing
    @toplevelracing 3 года назад +3

    What extension of vscode do you use to mark code blocks with white lines? Thanks 🙂

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

      Same here

    • @AamirKhan-zy5yt
      @AamirKhan-zy5yt 2 года назад +1

      It's simple.
      * Open VS Code Settings (by pressing ctrl + ,)
      * In search bar, type "flutter UI guides"
      * Now TICK the checkbox - (preview flutter UI guides)

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

    I really like your method to explain and share in flutter learning (in many of your videos), put it in real life case to make me more easy to understand the logic inside of coding, great works and thanks!

  • @ac130kz
    @ac130kz 4 года назад +10

    I'll keep using auto_route instead :D

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

    Hi, please Let me know if I add a new page support page totally unrelated to book and doesn't depend on _selected book . On a button click from anywhere take to support page . How can we navigate from any page to support page

  • @fenchai4892
    @fenchai4892 4 года назад +18

    those are some crazy boilerplate code. No thanks I'll keep using nav 1.0

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

      I agree on this.

    • @arthurlima923
      @arthurlima923 4 года назад +3

      Is it possible that nav 1.0 will get "obsolete" and we will have to migrate to 2.0? Because I'm currently learning nav 1.0 from an online course.

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

      ​@@arthurlima923 Here in Brazil we belive that it will used just for packages to easely some tasks, and that the "normal user" will continue to use nav 1.0.

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

      @@MaxweelFreitasdaSilva Opa, valeu cara! Sou Brasileiro também. Achei muito complexo o 2.0, espero que depois simplifiquem.

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

      @@arthurlima923 Então, com vista nisso a comunidade (Flutterando) está empacotando o nav 2.0 dentro do Modular (pacote que te auxilia com gerenciamento de rotas e injeção de dependências)

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

    Tnank you very much...
    how do you zoom.. is it a shortcut? OR zooming is done while editing the video?

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

    Does it mean tha the whole application is updated every time a navigation flow is executed?

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

    Great video, it was clear and simply. I was able to get the main concept of the nav. Keep up the great work!!👍🏿👍🏿

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

    Great video! Now, about the new navigator.... what a mess.

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

    I am more interested the vs code extension you use to display the errors on the same line. What is the extension called?😁

    • @MrQooje2
      @MrQooje2 4 года назад +5

      Error Lens.

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

    Very well explained
    Thanks

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

    Can I ask how I can set the initial route (at first launch of the app) to '/home' instead of '/'?

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

    What vscode plugin gives you the errors inline with the code?

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

    Hi I love your videos, one question how do you get the 'red' comments in VSCode while you are typing in commnads please, thanks Pierre

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

      I use the VSCode extension error lens.

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

      @@LearnFlutterCode thanks a million, I'am looking for a demo on how to use an existing sql database in flutter app

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

    so basically it listens to the change of selected book automatically so we just change the state that's all that's kind of cool with state management its easy

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

    hi sir, i enjoy watching your videos. I was going to ask something.Which theme are you using?

  • @ibrahimmammadov9669
    @ibrahimmammadov9669 2 года назад +1

    0:35 you can follow along this tutorial by fu*king this project

  • @silentperson639
    @silentperson639 4 года назад +3

    Tutorial on how you made the books app it looks sick

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

      I have not figure out how to make the tab bar, the one you see is fake XD. Other than that, most of the UI is achievable

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

    I loved your video man it was cristal clear thanks
    Maybe a quick code recap would have been perfect at the end :)

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

    sorry, but this approach of creating stateful widget instead of stateless just because of navigation 2.0, sucks.

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

    Make sure you 'fokk' the project !

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

      yeah i wonder how i can 'fokk' projects, because there are so many i want to 'fokk'

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

    thanks for this video but i think old one is better

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

    i dont understand lol.. how can u navigate nnext screen

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

      No worries, a lot of people do not understand too.

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

      @@LearnFlutterCode I understand this.. but I not understand that flutter web navigation.. if u kind can give example again that not have id book
      like a simple navigation to the next screen using navigation 2.0

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

    Isn't the level of the audio extremely low?

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

    I thick it's so f**kable in huge project . just use 1.0 version :)

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

    it really is complicated

  • @АлександрИванов-ю8с8г

    why it so complex now? for what?

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

      Some Javascript developer must have snuck in a #@%&*(&d things up for us.

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

      for simple cases, this method is too complex. however, if you want to have users change the url and sync with your flutter web app, then this is one way.

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

      @@LearnFlutterCode For any case, this is too complex. I have no problem synchronizing my URL with the existing system & Fluro - and I'm currently exploring ways to get Fluro out of the mix. Someone must be feeling the need for some extra job security, needlessly complicating things so nobody can follow behind them. What ever happened to 'optimize for developer happiness'?

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

    BRILLIANT!!!

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

    thanks man!

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

    in search of gold we lost Dimond be like :p

  • @Mark-og2cu
    @Mark-og2cu 4 года назад

    Audio is way too low!

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

    what's hard about this? XD

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

    Arguably the worst thing Flutter introduced so far