Тёмный

Managing State in Flutter - Introducing Flutter 

Flutter
Подписаться 574 тыс.
Просмотров 95 тыс.
50% 1

Let's get our app's progress bar working to reflect our task progress! How do you share state between widgets in Flutter? Learn what state management is and how you can use it to share state between widgets.
Riverpod → goo.gle/3ikU7PL
GitHub → goo.gle/3H02gUe
Begin learning Flutter → goo.gle/LearnF...
Subscribe to Flutter → goo.gle/FlutterYT
#Flutter

Наука

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

 

13 авг 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 106   
@flutterdev
@flutterdev Год назад
Begin learning Flutter → goo.gle/LearnFlutter
@bahaeddinsagar
@bahaeddinsagar Год назад
looks like no new videos for this series
@KhanhFlutter
@KhanhFlutter Год назад
Hi y'all! I just wanted to say thank you for keeping the dialogue going on this video and keeping things respectful! I know state management can be a contentious topic where we can have strong, varying opinions. Naturally, I was a bit hesitant taking on this video 🫣 but seeing the responses and conversations on your preferred state management tell me that the effort has paid off :) Thank you for being an awesome community with such a welcoming environment!
@lawofattractionspace
@lawofattractionspace Год назад
Thanks Khanh Nguyen, great content, it's helpful.
@momomumu8656
@momomumu8656 Год назад
thank your latest update after one year:)
@yorjanis5194
@yorjanis5194 Год назад
One question, can I translate your video into Spanish so that my students can see it on RU-vid to upload it?
@cookiesnuggles1
@cookiesnuggles1 Год назад
Woooo go Khannie!
@KhanhFlutter
@KhanhFlutter Год назад
@@yorjanis5194 Hey, Yorjanis! First, thank you for watching the video and liking it enough to want to translate it for your students :) Second, we actually have Spanish subtitles on this video now! The translations for our videos can sometimes be a bit delayed so it may not have been there yet when you watched the video. Hope this helps your students!
@akshaysrivastavaofficial
@akshaysrivastavaofficial Год назад
I was having two options: React or Flutter. And I am glad I chose Flutter. This is one of the most amazing and energetic community of developers. No doubt Flutter will touch skies in the coming years.
@KhanhFlutter
@KhanhFlutter Год назад
Thank you for being a part of our amazing and energetic community of developers!
@Lensbreak
@Lensbreak Год назад
Got a big smile on my face when i saw that you are "promoting" riverpod on this official channel. Best state management solution for flutter for sure!
@ultimaterex
@ultimaterex Год назад
Riverpod is fantastic, great video
@rudinandrey
@rudinandrey Год назад
GetX better :-)
@okie9025
@okie9025 Год назад
@@rudinandrey getx is bad in general, not just for state management
@marflage
@marflage Год назад
@@rudinandrey could you please explain why?
@RafiesAwesomeChannel
@RafiesAwesomeChannel Год назад
There's even riverpod hooks!
@rudinandrey
@rudinandrey Год назад
@@marflage easy to use. tools must to be easy. a lot of usefull tools like routing and so on.
@_dinesh
@_dinesh Год назад
This is an awesome explanation! Very easy to understand. Althought if you have team with mixed expertise. Then using riverpod can quickly get messy and then you have to reinvent the concepts of how to structure your code. In bloc, the standards are well defined. You have 3 files - State, Events and the bloc. Anyone starts new does have to feel like they are lost in the woods when looking at the code.
@squallsamas
@squallsamas Год назад
I completely agree about BLoC. Awesome pattern and awesome library for flutter.
@littlebearandchicken2077
@littlebearandchicken2077 Год назад
Nice video. At this time I still prefer to use Bloc mainly because it works so well in teams. It's more opinionated than Riverpod which (I guess) makes it less flexible but when working in teams or in situations where another developer is going to have to look at my code half a year from now it's really nice because it forces the developers to write code in a certain way, which creates consistency. That consistency is important so that the developers can understand each other's code better without running into surprises.
@andrewbrogdon558
@andrewbrogdon558 Год назад
Yep, plenty to like about flutter_bloc! There's a reason both it and Riverpod are Flutter Favorite packages. :)
@devyb-cc
@devyb-cc Год назад
For me, Riverpod is a breath of fresh air. I came from Provider, and it will become a mess quickly. I find it a little more exhaustive on debugging than Riverpod. Also, I like the concept of AsyncValue in Riverpod.
@merthyr1831
@merthyr1831 Год назад
They're both really good state management solutions, but Riverpod is definitely very opinionated in how you write models. Provider lets you control things a bit more but with the risk of messier model design.
@devyb-cc
@devyb-cc Год назад
@@merthyr1831 no doubt, in my opinion Riverpod and Provider have less boilerplate and "etc" package than other state management.
@filiphracek
@filiphracek Год назад
Thanks for this video, Khanh! Extremely gnarly topic, well explained. And it's clear you took great care in striking the balance between giving people useful advice, and starting a flame war. Cheers! P.S.: Seeing the provider and consumer blobs put a big smile on my face!
@akaneritsuki
@akaneritsuki Год назад
riverpod is rock solid! we use it in prod for over a year already 🤞 Now only thing that I wish for is static metaprogramming, since it'd makes riverpod even more intuitive to use.
@franklinoladipo2343
@franklinoladipo2343 Год назад
Just started riverpod and it has been awesome!!
@matteoborghi3942
@matteoborghi3942 Месяц назад
When I understood the watch I felt a rock lifted from my heart, it felt so easy
@bennguyen1313
@bennguyen1313 Год назад
I understand Google recommends Provider.. but with so many state management tools and approaches, it would be nice to have guidelines for best practices.
@linuxsever5727
@linuxsever5727 Год назад
Riverpod is a better "provider". I recommend it.
@guycz
@guycz Год назад
Great solution for state management =)
@alvin3171997
@alvin3171997 Год назад
Love Blocs and Riverpod, but still use Redux + Epics combo in production :D
@reggieholm6245
@reggieholm6245 Месяц назад
This video was very helpful with all that info condensed in 5 mins. I wish there was corresponding code as with previous videos. I have 2 errors in the main.dart file TaskItem has a red squiggly line underneath. The progress bar does not work.
@flutterdev
@flutterdev 12 дней назад
Hey there! Glad you found the video helpful! Check out the GitHub repository here → goo.gle/3H02gUe. It was hiding under the description's Show More button!
@valirmasha4718
@valirmasha4718 Год назад
Need more like this to learn flutter
@saqqara6361
@saqqara6361 Год назад
Great video... also using Riverpod right now...
@anmolkapoor1068
@anmolkapoor1068 Год назад
Scoped model, provider, inherited widgets are usually my go to choices
@andrewbrogdon558
@andrewbrogdon558 Год назад
If you're using scoped_model, you must have been coding with Flutter for a while! It's a great package, but definitely one of the oldest approaches to state management.
@RaymondAtivie
@RaymondAtivie Год назад
Riverpod!🎉
@sukruozgundemirel684
@sukruozgundemirel684 Год назад
You are great. I have been working with state management solutions for a long time understanding little of it. This video makes understanding those solutions pretty easy and I am thankful for that. Keep up those videos! :D
@devflix5316
@devflix5316 Год назад
Flutter's UI code, out-of-box support and documentation are awesome. Plus I love coding in dart. Still can't use in webdev cause after build its heavy and slow, specially lag in animation. Really hope it gets better and better. Although mobile and desktop builds seem fine.
@BrunoCodeman
@BrunoCodeman Год назад
Riverpod is definitely the best state management library available for flutter
@rdrgbaioco
@rdrgbaioco Год назад
definitely not.
@BrunoCodeman
@BrunoCodeman Год назад
@@rdrgbaioco What would you recommend? Google itself recommends riverpod.
@gintoki_sakata__
@gintoki_sakata__ 6 месяцев назад
​@@BrunoCodemanbloc
@TheRiddlerer
@TheRiddlerer Год назад
anyone has the link for the last part of this intro to flutter series? cant seem to find it anywhere
@JuanFcoRomero
@JuanFcoRomero Год назад
Awesome explanation for beginners!
@aytunch
@aytunch Год назад
Nice concise video. But my goto choice is still cubits. Perfect for bigger apps. You can have full control. And UI is more separated from business logic.
@adnanjpg
@adnanjpg Год назад
can you elaborate on how cubits are better for bigger apps?
@aytunch
@aytunch Год назад
@@adnanjpg Unlike blocs, cubits don't require boilerplate code. And in reality you will rarely need blocs(only for some complex stream input manipulations) Also you have better control of you state object with cubit/bloc. You can allow your widget tree to rebuild on only specific events. lastly, the business logic code lives on its own files, seperate from UI. You never need to call infrastructure code from UI. testing is a breeze.
@rsajdok
@rsajdok Год назад
@@aytunch nothing special, riverpod has is
@miladhesami6630
@miladhesami6630 Год назад
I'm using BLoC and it's scalable and easy to use. I suggest to check its toturials because you learn how to develop application using feature driven architecture
@naveedislam9697
@naveedislam9697 4 месяца назад
And here I was using shared preferences 😅 for this.
@winter_t
@winter_t Год назад
Riverpod 🤩
@2005sty
@2005sty Год назад
Why does the code rebuild the list of checkboxs for just one user check action? If I added thousand of items throughout my life, it is going to be slow when I check.
@dolbysoundsofficial9323
@dolbysoundsofficial9323 Год назад
Riverpod is best State management Solutions
@user-uz8gf5kv6y
@user-uz8gf5kv6y Год назад
Great! thank you.
@rod5751
@rod5751 Год назад
Well this is going to be contentious.....
@rmedola
@rmedola Год назад
GetBuilder state managment???? Is the better. Please talk about
@nakedtech1865
@nakedtech1865 Год назад
I would love to have a course like Google Garage about Flutter 🙏🏻
@abdelazizkayoueche8317
@abdelazizkayoueche8317 Год назад
Good keep going.
@cesaltinofelix
@cesaltinofelix Год назад
*I NEED HELP!* hi guys, i'm beginner on flutter development and i am just trying to implement what we are learning on this video ( flutter state management using flutter_riverpod), but i got an error in my StateNotifierProvider. could anyone help me ? obs: I'm learning english too, sorry for any mistake i've made. kkk
@verticrow
@verticrow Год назад
Awesome!
@FauziJabbar
@FauziJabbar Год назад
and the what's function of setState? kasih tau dong yg tau :( apakah harus menggunakan state management untuk handle errorMessage
@Kiriyaki65548
@Kiriyaki65548 Год назад
Nice!
@일하기싫어24
@일하기싫어24 Год назад
Please make a flutter splash screen animation tutorial. 😊
@gabrielfernandoalicuchallo6363
@gabrielfernandoalicuchallo6363 11 месяцев назад
No sabia que un tutorial podia iniciar con el final y terminar con el inicio, para alguien que inicia en Flutter esto es catastrofico. Porque pre-asumimos que dichas Clases Task and TaskNotifier podrian ser nombres reservados.
@isakhansson917
@isakhansson917 Год назад
Just use kmm with compose...
@whitenoiseconnoisseur
@whitenoiseconnoisseur 6 месяцев назад
I just realized Riverpod is an anagram for Provider 🤯
@dilshadxahmad
@dilshadxahmad 4 месяца назад
Me too realized that only few months ago. Cutely Genius tho.
@adolfomotanavarro6553
@adolfomotanavarro6553 Год назад
"Let's pick up where we left last time" I see what you did there
@dilshadxahmad
@dilshadxahmad 4 месяца назад
😅 Forcing us poor lads to watch the previous one?
@adolfomotanavarro6553
@adolfomotanavarro6553 4 месяца назад
@@dilshadxahmad no dude, I meant that she's talking about states
@dilshadxahmad
@dilshadxahmad 4 месяца назад
@@adolfomotanavarro6553 ok dude, my bad.
@pipzgutz
@pipzgutz Год назад
What's the title of video from previous?
@KhanhFlutter
@KhanhFlutter Год назад
It's this video! ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-QlwiL_yLh6E.html "What is State?"
@oreofesolarin
@oreofesolarin Год назад
🎉
@aryabp
@aryabp Год назад
introducing tauri 🗿
@anoniem012
@anoniem012 Год назад
Where is the source code of this task project?
@vetiam
@vetiam Год назад
✊🏾🔥🔥🔥
@faheemahmad3957
@faheemahmad3957 Год назад
Please teach us from Start like beginner please make
@KhanhFlutter
@KhanhFlutter Год назад
Hey there! What type of content would you like to see for beginners?
@in_staham
@in_staham Год назад
👍👍
@smt515n5
@smt515n5 Год назад
What is next video?
@manhtran2780
@manhtran2780 Год назад
flutter translate vietnamese very few
@ErCapoAlex
@ErCapoAlex Год назад
Up
@talatelbeick6829
@talatelbeick6829 Год назад
riverpod to me is the worse choose for many reasons, we loose encapsulation and a lot of OOP concepts. The best solution I can suggest for maintainable project is to make providers as privet other ways you don't know in which place you change the state.
@BooleanDev
@BooleanDev Год назад
what do you mean by you loose encapsulation and OOP concepts? Providers just give access to an object instance
@remirousselet6867
@remirousselet6867 Год назад
Feel free to provide counter arguments, but I'd argue that's false. You do know what modifies your state: The StateNotifier. Nothing else can modify it..
@talatelbeick6829
@talatelbeick6829 Год назад
@@remirousselet6867 It's true that I know by what my state is changed, but I cannot know or force it to be changed form a specific part of the app, obviously if my provider is public I'm able to change its state from any place in the app. Thanks!
@remirousselet6867
@remirousselet6867 Год назад
​@@talatelbeick6829 Depends. If you're referring to "scoping an object to only one screen", you can do that in Riverpod. It's not true that you can change the state from any place.
@talatelbeick6829
@talatelbeick6829 Год назад
@@remirousselet6867 Interesting, how can I be sure that X provider is changed only in deceleration file?
@Samudbhava
@Samudbhava Год назад
does not explain how _TaskItemState extends State needs to be changed to support WidgetRef paramenter in build. This is where learning something becomes frustrating and all the hard work and easy explanations become an insult to someone who just wants to learn. the out of sequence presentation of changes makes it much worse. if you are showcasing your framework, please dont label it as a tutorial.
@KhanhFlutter
@KhanhFlutter Год назад
Hey there! I'll make a note to clarify that up front next time so to not be misleading. Just to share my motivation behind this video, I hadn't intended on the video being a full Riverpod tutorial since there's already so much great content from the community which covers it. I wanted to share the concept of state management and RiverPod was a good way to show a more concrete example of the concepts that I discussed, so I glossed over a lot of the implementation details. Plus, we would've needed more than 5 minutes to cover everything ;) Thank you for sharing that feedback, I really appreciate it!
@pixobit5882
@pixobit5882 3 месяца назад
I have the same problem. What changed do need to be made? I'm stuck...
@pixobit5882
@pixobit5882 3 месяца назад
For everyone in the future: 1. Change your TaskItem to extend ConsumerWidget 2. Remove the createState() method from TaskItem 3. Move the build() method from _TaskItemState to TaskItem 4. Delete _TaskItemState, it is not needed anymore. 5. (It not already done, make changes to Checkbox seen in video at 4:44) 6. Change "widget.label" from Text to "task.label" I home this helped someone!
@catbb
@catbb Год назад
came from scopedModel. then provider. then to inheritedWidget. with streamControllers. basically provider of my own
Далее
Life of a Widget?! | Decoding Flutter
3:00
Просмотров 65 тыс.
Riverpod Simplified | Easy State Management
14:17
Просмотров 43 тыс.
Редакция. News: 129-я неделя
49:53
Просмотров 2 млн
Null safety in Dart - Introduction
5:27
Просмотров 163 тыс.
Pragmatic State Management in Flutter (Google I/O'19)
33:25
Flutter Provider EASY Tutorial
9:43
Просмотров 47 тыс.
Riverpod or Bloc? Which One is Better?
3:44
Просмотров 40 тыс.
State Management Like A Pro - Flutter Riverpod
10:30
Просмотров 76 тыс.
Avoid using StatefullWidget!
3:50
Просмотров 8 тыс.
Flutter State Management - The Grand Tour
14:07
Просмотров 240 тыс.
Способы сделать фото на iPhone
0:26
Самая редкая видеокарта NVIDIA
1:00
Nokia 3310 top
0:20
Просмотров 4,9 млн
⚡️Самый РЕДКИЙ провод Apple🍏
0:43
Открываем домофоны с Mi Band 9
0:59
Просмотров 500 тыс.