Тёмный

Flutter Navigator 2.0 (Pages API) Simply Explained 

kietay
Подписаться 152
Просмотров 11 тыс.
50% 1

Article mentioned: / learning-flutters-new-...
Flutter's new Navigator 2.0 aka the Pages API has been causing some confusion. I hope this video will explain how it is simply applying the declarative programming paradigm to the Navigator.
(should have made the text bigger in the app / intellij, apologies)
Also I said the back button dispatcher is not necessary, which is wrong. You must supply a function to onPopPage(). Just use `(route, result,) {return route.didPop(result)}` for the most simple implementation!

Опубликовано:

 

21 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 35   
@gwapster13
@gwapster13 3 года назад
Declarative was supposed to make it simpler. The opposite happened. 🤣. Deciphering this crap should be a LeetCode problem. Good thing you explained it better than those guys from the flutter team.
@sonxuannguyen1207
@sonxuannguyen1207 3 года назад
Didn't understand the concept during the first half of the video, but the other half really enlightens me. The Medium article written by the Flutter dev is really obscure and I would never understand this without your video. Thank you!
@崇尋中馬
@崇尋中馬 3 года назад
Definitely the best introduction on Navigator 2.0.
@rahulrvp
@rahulrvp 3 года назад
The best/simplified explanation about Navigator 2.0 seen on RU-vid so far. Thanks.
@kietay
@kietay 3 года назад
Thanks! :D
@tenhobi
@tenhobi 2 года назад
This is how the Flutter team should have explained it... :) Nice work.
@SaptadeepDutta_Ex-Xerox
@SaptadeepDutta_Ex-Xerox 3 года назад
Brilliant! Outstanding walkthrough! Also, amazed (and bit perturbed too) how an acknowledged Pythoneer is now switching over to Flutter!
@MichaelMaitlen
@MichaelMaitlen 3 года назад
Thanks for the excellent explanation! Excited to finally have a decent grasp to implement in my web Flutter app
@thepaulbig
@thepaulbig 3 года назад
Your explaination is the best one i found, thanks for this video.
@mukhtharcm
@mukhtharcm 2 года назад
Man really loved this video! Simply explained! :)
@tayer00
@tayer00 3 года назад
Man you make it easy. Best explaining vid ever👌
@kietay
@kietay 3 года назад
Thanks :D
@quangle5701
@quangle5701 3 года назад
Excellent explanation ! Thank you very much.
@petacardi
@petacardi 3 года назад
This means that for each app state its corresponding navigation stack needs to be built entirely?
@sharbelokzan9673
@sharbelokzan9673 2 года назад
Very well explained
@FlutterMapp
@FlutterMapp 2 года назад
Awesome! 🎉🎉🎉🎉
@MichaelAuerswald
@MichaelAuerswald 3 года назад
Really nice summary!
@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 apge to support page
@kietay
@kietay 3 года назад
So the thing with this approach is it really leaves it up to you. I would suggest you could do something like store an enum of all the “top level” pages in your app, e.g. [home, support, …], then assign a variable called something like ‘currentPage’ and render the page based off the selected enum
@JanaJaagruthi
@JanaJaagruthi 3 года назад
@@kietay Thanks
@elliotpolinsky9422
@elliotpolinsky9422 2 года назад
this is fantastic
@puruchandra
@puruchandra 5 месяцев назад
Thanks, Trent Alexander-Arnold
@d.winkler
@d.winkler 3 года назад
Good job!
@ronytesler
@ronytesler 3 года назад
OnPopPage is not called when pressing the browser back button. How can I capture this?
@kietay
@kietay 3 года назад
It’s the equivalent of you just returning to the previous route info which your route information parser should handle. Is there a use case where this wouldn’t be suffice? May be able to help more if I understand.
@ronytesler
@ronytesler 3 года назад
@@kietay I use a stepper for a form. Sometimes the users click the back button (android device or browser) in order to go to the previous step, but what happens is that the browser takes them to the previous URL, which is usually not of my app. Thanks.
@kietay
@kietay 3 года назад
Gotcha, I believe the OnWillPop widget should be able to capture that intent to go back and then you can handle it from there. I’m not 100% sure though, I know this works for the android back button but not certain it’s able to capture a browser back button. Let me know if that works, if not will do some further reading as there must be a solution
@ronytesler
@ronytesler 3 года назад
@@kietay I also tried that, it didn't work.. If you find anything I'd be glad to try : ).
@kietay
@kietay 3 года назад
@@ronytesler OK will have a look when I get a chance. One hack I could think of is, instead of linking directly to the form, could you link to a landing page which then navigates to the form from within the flutter app? So you create 2 separate entries in the browser history stack. Can't think off the top of my head what that solution would look like.
@banglafactsteller6780
@banglafactsteller6780 3 года назад
waiting for new video
@Bogdan-xc3ws
@Bogdan-xc3ws 3 года назад
Можно помедленней, я записываю ))) И так ничего не понятно, а еще эти ваши glottal stop ...
Далее
Flutter Navigator 2.0 for Beginners
9:35
Просмотров 53 тыс.
What’s your height?🩷🙀💚
00:59
Просмотров 3,8 млн
Flutter State Management - Explained
14:30
Просмотров 3,4 тыс.
React visually explained: 'use client'
15:57
Просмотров 53 тыс.
Best 30 Flutter Widgets, Packages & Tips
5:11
Просмотров 122 тыс.
JavaScript Visualized - Execution Contexts
11:41
Просмотров 63 тыс.
I Remade YouTube From Scratch Using Just Bash
17:51
Просмотров 61 тыс.
What’s your height?🩷🙀💚
00:59
Просмотров 3,8 млн