Flutter state is an absolute mess. Android development is an absolute mess. New and old and many options but no real proper way. Pick one and stick to it. This video is from 2019, It's 2022 now. Now provider is the default choice when reading the docs. Who knows what it will be in 3 years. Pick one and stick to it. I'm so tired of learning and learning and not being productive. Builder pattern blah pattern. I wouldn't even care about flutter if oidc wasn't an even bigger mess and it's only a mess because of you, Android is megamess. It works well in a browser but it doesn't work on Android. You have AppAuth and it's as complicated as can be. Why does everything have to be such a inflated, complicated mess at Google?
new to flutter here, so this means you can create your whole app with providers and static widgets turning stateful widgets useless unless minor local state management?
Believe it or not this video was my first interaction with flutter when I began my journey in May 2020. It was unbelievably complex but I'm glad I dint give up. I've been a fan of Filip ever since.
"Thank you very much"; "Great tutorial"; "You're the best", and it goes on and on... Give honest feedback already! This is not personal and this applies to most content creators who teach flutter even Google's Flutter official channel, almost everyone is explaining things based on the assumption that the viewer comes from an app development background or that they already have been working with this "standalone" technology which is not so standalone if I had to get acquainted with other languages and frameworks to be able to understand its basics, people who started from scratch (to whom these crash courses should be addressed) are not accounted for whatsoever. This creates an entry barrier, this prevents the app/web dev communities to prosper and become richer, there may be people who could have had an influence on the current practices if they were taken into consideration. Again, this is not personal, I'm merely describing reality.
They literally said that bloc was perfectly fine and that they use it themselves. I think this was geared towards users who havnt made a choice yet and are confused by all the options and just want to be told 'use this'.
The final conclusion of this talk was if you feel comfortable with BLoC or Redux there's nothing wrong in using them, there's no golden bullet for Flutter apps architectures.
1. State Management: When we want to change the state of a widget from outside the widget, i.e. from another widget, network, or system call. //Example 2. In the example the outside entity is: another widget. 3. Making a global state is not a good idea as: a. It Increases Coupling, b. Not scalable as there may be more than one implementation of the widget, c. Calling set state from outside the widget is bad as we'll have difficulty figuring out who changed the state of the widget in case of multiple callers. 4. Let the framework help you instead of fighting it. 5. UI is a function of state in declarative frameworks: UI = f(state) ...(f = build methods that declare what the screen should look like at any given time) Hence only the state should mutate the UI and not the other UI elements themselves. 6. In order to deal with our previous problem we lift the state up, i.e. make a model at the level that is accessible to both the widgets. 7. When the value of MySlider changes, it notifies MySchedule. MySchedule in turn notifies all its listeners in this case, just MyChart and then notifies MySlider that the update was successful. 8. History of flutter state management: a. Scoped model: Implementation of #7 b. BLoC: Used for large scale applications. Difficult to understand, implement and a lot of boilerplate code, requires knowledge of Rx and Streams. 9. Currently used: Scoped Model: features a lot of ad-on features to the scoped model. 10. Mixins: medium.com/flutter-community/dart-what-are-mixins-3a72344011f3 11. ChangeNotifier: adds listening capabilities to MySchedule: addListener, removeListener, dispose... 12. Lift the state up. Use the ChangeNotifierProvider widget in MyApp as the parent of MyChart and MySlider. 13. Use the builder in the widget to build the MySchedule model. 14. Get reference of the model from the Widgets can be done by: a. Consumer, ...(a widget that contains a builder that provides the reference to the model) b. Provider.of(context) 15. Update the model from it's reference inside the widget. For the listeners, update the listeners by the model reference. //State "Management" 16. Disposables: Cleaning up when the widget is getting disposed of done with dispose callback of Provider. ChangeNotifierProvider does the dispose part for you. 17. Break your state up into different components and classes to keep it simple. Use MultiProviders when needed. 18. Use anything with the provider, streams, data, whatever
I've been suffering for days trying to implement a feature in a personal project and I just finished implementing the hardest part of it thanks to this talk and the Provider implementation. Life is good. Thank you, guys!
Hello am John from Uganda East Africa. I have an app idea but i couldn't afford to pay engineers for building it so I started learning programming. But I can't figer out how to store and use the input data form user please help me how do I do it.
@@elisiosa3111 if you need to store data locally on user's device, think about shared_preferences package or some databases (see sqflite package for example)
So if i'm comfortable w/ both BLoC and Provider, for the next big complicated app, should I use one instead of another? I could not deduce pros and cons of these 2 being compared to each other after watching this presentation.
You can use both. The provider is a way to provide your state to your widgets. If you manage state through a BloC then you can provide that using the provider. The example here shows that. pub.dev/packages/provider#-example-tab-
I Believe Rx is the best since uses Behaviour thingy which unSubcribes by itself on dispose, hence you pass streams to StreamBuilders which dont need to render all the UI and only its subChildrens...
"We spent a long time thinking about how we could make the title of our talk the most exciting and clickbaity title we could make it" - Every single RUclipsr on this entire damn platform
More than a year working with flutter and dart, from those early days to these Glorious times i just saw one thing and that was the absolute art. Thinking about development teams and their unbelievable talent and work is mind blowing... I believe we shouldn’t call them programmers or developers, in fact they are artists. I think we need to change our perspective of what the art is.
If you are interested in the fisrt demo , you can get it here :github.com/lvsj/control_chart_with_slider. There are several solutions, hope you like it.
Pls use for the next time direct the audio from the mixing console and don't record it Extra, that would reduce the reverb so much and if you still want to have sound from the public then just another micro for choirs and they just don't put it on the speakers that wouldn't do anyone any good
WOWWWWW, new approaches to get the ball rolling! Software dev seems to be evolving sideways... replacing brackets by braces and vice versa... Why? This is like GWT (google web toolkit)... that lasted for a few years only....
Hi, i have doubt in provider, i have implemented MVVM architrcture. I failed to redirect the page in Login page after getting api response from LoginViewModel . can you send any reference to overcome my problem.
I have a online shop app which has a detail product screen. when user enters, the app should request to backend for detail product. Should i use provider in this case? since i think Provider is a global state management. While i just need the data only for detail screen, not anything else. I mean, notifyListener seems like useless in this case.
I am that much new to Flutter states that even, I found 6:57 really inspiring, and in fact I needed something like this for my recent projects lol Thanks for the video, it was really fun and informative :)
So if you guys at Google are now using package:provider even with streams are you no longer using BLoC in scenarios with more complex design patterns? You still quasi recommend BLoC and other various choices at the end of the video (of course based on needs) but it's hard to imagine Google has no complex needs in any scenarios, and it sounded as if you yourselves have entirely moved off BLoC pattern.
i have been search for good architecture for flutter to build my app i see tdd clean architecture but now i see provider is this is enough to build my app or must use some MVC ????
We're only showing UI code in the talk, and you should try not to have business logic in there. Many people would put business logic in the provided object (the ChangeNotifier). Others might have it separate, keeping the model as simple as possible. I believe this is where we get into the larger questions about state management as "all of computer science".
@@filiphracek Hi, Filip! Thanks for your answers on even comments with just one like! ) And do you have any lections about this theme? Because every real app is not only UI. It's always a huge chanks of business logic and a lot of models. But for some odd reason, all Flutter pattern talks concentrate only on UI. I'm starting my app now and totally frustrated with this. Is this a good idea to use the MVC pattern along with Provider where the provider will be a "view" part? Or business logic would have a good fit into Provider so provider would be just a sort of "Controller" and replace whole MVC pattern? Or it's a "model" as you said at the end of this video? So hard to make these first steps from another language to Flutter and dart.
This seems way too complex. With the Provider implementation of MySlider and MyChart, both are now tied to a specific model type. They are sliders and charts for schedules only. It would be better if MySlider, had a callback option that will tell MyHomePage that the value has changed. Then MySlider doesn't need to know what it is a slider for. It is just a generic slider. When the value changes, rebuild MyHomePage and send the data to the slider and chart during the build. MyHomePage would tie it all together. If MySlider really needs to be specialized to be a slider only for a schedule state type, why not pass that object in explicitly as a constructor parameter? Then dependency injection is clear. It is just a few characters to inject directly and saves the complexity and limitations of Consumer(...). Way too much magic.
If you widget tree is very deep, passing the value up would get very messy. What if you had to use lots of schedules in different parts of the app? Also, the solution you're proposing would add more complexity to MyHomePage, which is never the idea. But you're right that for the app shown, the most practical solution is to manage that state in MyHomePage
You can use the MultipleProvider widget then supply all of your ChangeNotifierProviders inside of it at the top level. On the widgets themselves (like MySlider and MyChart), just call Provider.of or Consumer whenever needed. This way, widgets don't have to be tied to anything. You can check out the demo app made by 2Dimensions on how to do that since the codebase used Provider extensively.
This made me think. I’m not convinced with the provider package too. I really think that Flutter team must find a better and simpler way for StateManagement. Flutter is great. I can develop and see the results really fast like never before. Sometimes, providing many solutions is bad. Especially in this video, even though the first approach was not good according to the Flutter team, I’d rather using it. At least the children widgets don’t have to be descendants of the same widget in the tree. These are my thoughts relative to my knowledge.
There's also an alternative in the flutter_bloc package, called treeprovider or blocTreeProvider... But it's just a nested bloc inside the other BLoC... Anyways it works like a charm, you can have 5 different BLoCs and the child would be accessible to all of them.
Good job, Filip and Matt. You guys came to rescue when I was struggling with stateManagement in Flutter to get hold on it. Now its crystal clear and I know which pattern to go with and when. Choice is mine. Thanks a lot to both of you...🙏 @Matt: Viewer would like to see you in new shirt in upcoming conference.... 😄
Very good explanation about the State mangament. I am loving the work with provider it's very ease to implement when compared with bloc. But why many people out there and In the medium suggesting the bloc. Can anyone help me out is there any down side in provider when compared to bloc. Thank you.
Flutter is a fastly evolving framework, always pay attention to the date of the post. If it's > 1 year consider it obsolete. Apparently, Provider package didn't exist back then
Where can I learn more about nested notifiers? I really often need to update something small within my ViewModel rather than notifying that my entire ViewModel was changed
When people say BLoC, do they mean flutter_bloc or old school bloc writing a bloc provider? flutter_bloc is indeed too complex.. old school bloc i think it is awesome, just needed some provider package to implement it without "hacks", or code downloaded from blogs.
I've found that most are referring to the flutter_bloc package when talking about BLoC which I find very confusing. I'm with you: I think the BLoC pattern is awesome and, if you're familiar with Rx, it's really straight forward.
Hello, please I want to know if it's okay to get a macbook pro with 8gb ram and 256ssd for flutter programming? Won't xcode and android studio run slowly on it?
This made me think. I’m not convinced with the provider package too. I really think that Flutter team must find a better and simpler way for StateManagement. Flutter is great. I can develop and see the results really fast like never before. Sometimes, providing many solutions is bad. Especially in this video, even though the first approach was not good according to the Flutter team, I’d rather using it. At least the children widgets don’t have to be descendants of the same widget in the tree. These are my thoughts relative to my knowledge.
Good talk. I'm new to Flutter, and since I come from a React background I used Redux for my first Flutter project. It's working just fine, but I'm not entirely sure what the best practices of initial data fetching in Flutter are. How is everybody fetching initial data?
Im also curious about this... in initState() i am sometimes calling 3+ async methods and im not sure if i should chain them and call setState() at the end or use some other approach...
I have an question, that I have 0 experience in programming language and I want to build the app for my startup, I willing to go learning with flutter, still I can make the apps development with flutter course only?
You can, I did for my Startup. But it will take time, start with small apps and then Scale. And don't worry if the very first version you make isn't the best as it's the First not the last 🙂.
i watched this piece and really love it.. the delivery and explanation of the concept was top notch. this will definately help and aid my journey of becoming a flutter developer. thank you google
The audience didn't pass the vibe check
Don't be sad Matt. I wear the same pajamas while watching you last year.
so funny ...
Güzel espri reis Cem Yılmaz la bi akrabalık var mıydı?
Funny you guy
By far the best flutter talk i have seen.
funny, weigh's alternative methodologies and very educative.
Flutter state is an absolute mess.
Android development is an absolute mess.
New and old and many options but no real proper way.
Pick one and stick to it. This video is from 2019, It's 2022 now. Now provider is the default choice when reading the docs.
Who knows what it will be in 3 years.
Pick one and stick to it. I'm so tired of learning and learning and not being productive.
Builder pattern blah pattern.
I wouldn't even care about flutter if oidc wasn't an even bigger mess and it's only a mess because of you, Android is megamess.
It works well in a browser but it doesn't work on Android. You have AppAuth and it's as complicated as can be. Why does everything have to be such a inflated, complicated mess at Google?
Flutter Devs: What you need in state management?
Me: yes!
Great , clears a lot of ambiguity when choosing a state management
new to flutter here, so this means you can create your whole app with providers and static widgets turning stateful widgets useless unless minor local state management?
Believe it or not this video was my first interaction with flutter when I began my journey in May 2020. It was unbelievably complex but I'm glad I dint give up. I've been a fan of Filip ever since.
"Thank you very much";
"Great tutorial";
"You're the best", and it goes on and on...
Give honest feedback already!
This is not personal and this applies to most content creators who teach flutter even Google's Flutter official channel, almost everyone is explaining things based on the assumption that the viewer comes from an app development background or that they already have been working with this "standalone" technology which is not so standalone if I had to get acquainted with other languages and frameworks to be able to understand its basics, people who started from scratch (to whom these crash courses should be addressed) are not accounted for whatsoever.
This creates an entry barrier, this prevents the app/web dev communities to prosper and become richer, there may be people who could have had an influence on the current practices if they were taken into consideration.
Again, this is not personal, I'm merely describing reality.
This provider sound much easier than bloc. Would love to see more detailed tutorials.
Love their style of delivery, makes the video very enjoyable along with being informative
Currently at 14:00 and crying into my cornflakes as just finally got to grips with Bloc pattern and now a new reccomended approach.
If you like Bloc, stay with it!
I believe the point is if you have trouble with Bloc, they recommend Provider and you can migrate to Bloc as you need.
They literally said that bloc was perfectly fine and that they use it themselves. I think this was geared towards users who havnt made a choice yet and are confused by all the options and just want to be told 'use this'.
The final conclusion of this talk was if you feel comfortable with BLoC or Redux there's nothing wrong in using them, there's no golden bullet for Flutter apps architectures.
Can feel ya bud.. But I feel that BLoC will still be preferred for more complicated stuff.
1. State Management: When we want to change the state of a widget from outside the widget, i.e. from another widget, network, or system call.
//Example
2. In the example the outside entity is: another widget.
3. Making a global state is not a good idea as:
a. It Increases Coupling,
b. Not scalable as there may be more than one implementation of the widget,
c. Calling set state from outside the widget is bad as we'll have difficulty figuring out who changed the state of the widget in case of multiple callers.
4. Let the framework help you instead of fighting it.
5. UI is a function of state in declarative frameworks: UI = f(state) ...(f = build methods that declare what the screen should look like at any given time)
Hence only the state should mutate the UI and not the other UI elements themselves.
6. In order to deal with our previous problem we lift the state up, i.e. make a model at the level that is accessible to both the widgets.
7. When the value of MySlider changes, it notifies MySchedule. MySchedule in turn notifies all its listeners in this case, just MyChart and then notifies MySlider that the update was successful.
8. History of flutter state management:
a. Scoped model: Implementation of #7
b. BLoC: Used for large scale applications. Difficult to understand, implement and a lot of boilerplate code, requires knowledge of Rx and Streams.
9. Currently used: Scoped Model: features a lot of ad-on features to the scoped model.
10. Mixins: medium.com/flutter-community/dart-what-are-mixins-3a72344011f3
11. ChangeNotifier: adds listening capabilities to MySchedule: addListener, removeListener, dispose...
12. Lift the state up. Use the ChangeNotifierProvider widget in MyApp as the parent of MyChart and MySlider.
13. Use the builder in the widget to build the MySchedule model.
14. Get reference of the model from the Widgets can be done by:
a. Consumer, ...(a widget that contains a builder that provides the reference to the model)
b. Provider.of(context)
15. Update the model from it's reference inside the widget. For the listeners, update the listeners by the model reference.
//State "Management"
16. Disposables: Cleaning up when the widget is getting disposed of done with dispose callback of Provider. ChangeNotifierProvider does the dispose part for you.
17. Break your state up into different components and classes to keep it simple. Use MultiProviders when needed.
18. Use anything with the provider, streams, data, whatever
Thank you
ThankYou
THANK YOU
that is What I want in the description thank you !
Of course...
What is best state management for flutter as of 2022?
I watch this everytime i forget how to do this. so thats once a week...
So i am in the club now? 😂 I needed exactly this now i can rewrite everything and i just realized you wrote this comment a year ago 😅
I've been suffering for days trying to implement a feature in a personal project and I just finished implementing the hardest part of it thanks to this talk and the Provider implementation. Life is good. Thank you, guys!
Hello am John from Uganda East Africa. I have an app idea but i couldn't afford to pay engineers for building it so I started learning programming. But I can't figer out how to store and use the input data form user please help me how do I do it.
@@johnmw170 have you figured it out how to store user data? I would like to know how to
@@elisiosa3111 if you need to store data locally on user's device, think about shared_preferences package or some databases (see sqflite package for example)
19:40 I just love how the attitude given towards community packages 😊
@Matt...!!!! Your shirt hurting my eyes 🙄
Project page: github.com/2d-inc/developer_quest
@MattSullivan What is that modified version of Bloc pattern, could you share some details?
So if i'm comfortable w/ both BLoC and Provider, for the next big complicated app, should I use one instead of another? I could not deduce pros and cons of these 2 being compared to each other after watching this presentation.
This is what I'm wondering too...
In your experience, which is the most beginner friendly and easy to use approach among the 2?
You can use both. The provider is a way to provide your state to your widgets. If you manage state through a BloC then you can provide that using the provider. The example here shows that. pub.dev/packages/provider#-example-tab-
Use the one you are most comfortable with. They are both great state management tools.
@@junpeiiori4720 package provider is easier then Bloc in my experience.
1:00 Story of my (work-) life. i just love these guys!
its very interesting to see that flutter was developed by google but they aren't using android studio for development LoL infact ther are using vscode
I feel lucky watching this video as I am two weeks into Flutter!
I Believe Rx is the best since uses Behaviour thingy which unSubcribes by itself on dispose, hence you pass streams to StreamBuilders which dont need to render all the UI and only its subChildrens...
For Xamarin.Forms developers, this is the nearest thing to the MVVM pattern, ChangeNotifier is like INotifyPropertyChanged
and also the optimized way to check if you should notify or not.
"We spent a long time thinking about how we could make the title of our talk the most exciting and clickbaity title we could make it"
- Every single RUclipsr on this entire damn platform
do you guys have the source code of the presented app ?
More than a year working with flutter and dart, from those early days to these Glorious times i just saw one thing and that was the absolute art.
Thinking about development teams and their unbelievable talent and work is mind blowing...
I believe we shouldn’t call them programmers or developers, in fact they are artists. I think we need to change our perspective of what the art is.
Thank you for the awesome presentation! Now a real and simple alternative for state management. Source code for the demo?
github.com/2d-inc/developer_quest
Pragmatic State Management in Flutter (Google I/O'19) Example Replica:
github.com/akilaj-oc/hello-flutter/tree/master/2_provider_pie_chart
Great talk. As someone who is very used to MVC from iOS I was confused where to start with flutter. This is a great way to start.
Remi Rousselet is awesome for creating Provider
Now i feels like Redux was so easy to use 😴
If you are interested in the fisrt demo , you can get it here :github.com/lvsj/control_chart_with_slider. There are several solutions, hope you like it.
Thank you!
Liking this video because of 13:58 - 14:05 lol.
I am a totally beginner, self-study. Should I understand it by simply watching to this video, or should I keep learning some more ?
It's funny. That's the fail of declarative UI. Imperative style for the win.
Remember to turn down your volume after the video ends if you want to preserve your hearing.
Pls use for the next time direct the audio from the mixing console and don't record it Extra, that would reduce the reverb so much and if you still want to have sound from the public then just another micro for choirs and they just don't put it on the speakers that wouldn't do anyone any good
Hope you Google will continue these technolgoies you are putting out, i am so amazed by Go, Dart, Flutter
Fireship dude also talked about this
Pragmatic State Management in Flutter (Google I/O'19) Example Replica:
github.com/akilaj-oc/hello-flutter/tree/master/2_provider_pie_chart
WOWWWWW, new approaches to get the ball rolling! Software dev seems to be evolving sideways... replacing brackets by braces and vice versa... Why? This is like GWT (google web toolkit)... that lasted for a few years only....
But isn't Provider constantly walking the tree? How's that affecting performance?
watching in 2024, helpful for beginner like me
Hi, i have doubt in provider, i have implemented MVVM architrcture. I failed to redirect the page in Login page after getting api response from LoginViewModel . can you send any reference to overcome my problem.
Great session, thanks guys! Simple question re IDE usage, why are you using vsCode instead of Android Studio?
Last year that Google I/O was something cool, shame ;/
Flutter is from google as well firebase. Why the firebase documentation don't have flutter examples? :)
hmm, not even googlers use AndroidStudio? :))))
I have a online shop app which has a detail product screen. when user enters, the app should request to backend for detail product. Should i use provider in this case? since i think Provider is a global state management. While i just need the data only for detail screen, not anything else. I mean, notifyListener seems like useless in this case.
I am that much new to Flutter states that even, I found 6:57 really inspiring, and in fact I needed something like this for my recent projects lol
Thanks for the video, it was really fun and informative :)
So if you guys at Google are now using package:provider even with streams are you no longer using BLoC in scenarios with more complex design patterns? You still quasi recommend BLoC and other various choices at the end of the video (of course based on needs) but it's hard to imagine Google has no complex needs in any scenarios, and it sounded as if you yourselves have entirely moved off BLoC pattern.
The whole video I was not sure if the fly is real or in the video... btw really nice info. I am starting to love Flutter
Thanks a lot. Just learned about provider.
Very informative! Thanks for the video.
Although the jokes made me cringe
I'm so happy that you guys decide to keep talking about state at these conferences.
How deal with various booleans in a stateful widget. Is provider really a solution for that?
Here is the code Provider v4.x Updated : github.com/krupeshxebia/Pragmatic-State-Management
i have been search for good architecture for flutter to build my app
i see tdd clean architecture but now i see provider is this is enough to build my app or must use some MVC ????
@29:24 haha....was waiting for that. All non-trivial apps that survive will eventually end up with dirty state management.
Can anyone tell me, what Visual Studio extensions are they using for the stuff like "Wrap in a component", "Convert to statefull widget", etc.?
Where inside that would you put business logic or network requests?
We're only showing UI code in the talk, and you should try not to have business logic in there. Many people would put business logic in the provided object (the ChangeNotifier). Others might have it separate, keeping the model as simple as possible. I believe this is where we get into the larger questions about state management as "all of computer science".
@@filiphracek Hi, Filip!
Thanks for your answers on even comments with just one like! ) And do you have any lections about this theme? Because every real app is not only UI. It's always a huge chanks of business logic and a lot of models. But for some odd reason, all Flutter pattern talks concentrate only on UI. I'm starting my app now and totally frustrated with this.
Is this a good idea to use the MVC pattern along with Provider where the provider will be a "view" part? Or business logic would have a good fit into Provider so provider would be just a sort of "Controller" and replace whole MVC pattern?
Or it's a "model" as you said at the end of this video?
So hard to make these first steps from another language to Flutter and dart.
not seeing where this was posted anywhere else but the github link for the app at 20:11 is github.com/2d-inc/developer_quest
what do you think about pub.dev/packages/flutter_hooks ?
is it a good practice to use it ?
thanks.
Love the small parts of humor!
This seems way too complex. With the Provider implementation of MySlider and MyChart, both are now tied to a specific model type. They are sliders and charts for schedules only. It would be better if MySlider, had a callback option that will tell MyHomePage that the value has changed. Then MySlider doesn't need to know what it is a slider for. It is just a generic slider. When the value changes, rebuild MyHomePage and send the data to the slider and chart during the build. MyHomePage would tie it all together. If MySlider really needs to be specialized to be a slider only for a schedule state type, why not pass that object in explicitly as a constructor parameter? Then dependency injection is clear. It is just a few characters to inject directly and saves the complexity and limitations of Consumer(...). Way too much magic.
If you widget tree is very deep, passing the value up would get very messy. What if you had to use lots of schedules in different parts of the app? Also, the solution you're proposing would add more complexity to MyHomePage, which is never the idea. But you're right that for the app shown, the most practical solution is to manage that state in MyHomePage
You can use the MultipleProvider widget then supply all of your ChangeNotifierProviders inside of it at the top level. On the widgets themselves (like MySlider and MyChart), just call Provider.of or Consumer whenever needed. This way, widgets don't have to be tied to anything. You can check out the demo app made by 2Dimensions on how to do that since the codebase used Provider extensively.
This made me think. I’m not convinced with the provider package too.
I really think that Flutter team must find a better and simpler way for StateManagement. Flutter is great. I can develop and see the results really fast like never before.
Sometimes, providing many solutions is bad.
Especially in this video, even though the first approach was not good according to the Flutter team, I’d rather using it. At least the children widgets don’t have to be descendants of the same widget in the tree.
These are my thoughts relative to my knowledge.
So, can we use it to provide multiple bloc to our child widget?
There's also an alternative in the flutter_bloc package, called treeprovider or blocTreeProvider... But it's just a nested bloc inside the other BLoC... Anyways it works like a charm, you can have 5 different BLoCs and the child would be accessible to all of them.
Where can I get the code of the Chart and Slider using provider and change notifier from this demo????
Good job, Filip and Matt. You guys came to rescue when I was struggling with stateManagement in Flutter to get hold on it. Now its crystal clear and I know which pattern to go with and when. Choice is mine. Thanks a lot to both of you...🙏
@Matt: Viewer would like to see you in new shirt in upcoming conference.... 😄
Glad to hear this is helping you on your Flutter journey 🚂
Happy Fluttering 😎
I will use it with Bloc, because my current issue with Bloc is providing it through the widget tree, I hope it's efficient in that aspect though.
Very efficient, yes. And provider makes it easy to clean up the provided objects, which comes handy with an approach like BLoC.
Also, try package:flutter_bloc :)
Very good explanation about the State mangament. I am loving the work with provider it's very ease to implement when compared with bloc. But why many people out there and In the medium suggesting the bloc. Can anyone help me out is there any down side in provider when compared to bloc. Thank you.
Flutter is a fastly evolving framework, always pay attention to the date of the post. If it's > 1 year consider it obsolete. Apparently, Provider package didn't exist back then
it still complicate
to understand for me cuz I'm not that smart where is the official doc
you can search the web in order to find more and I believe you will finally find one that you understand.
isn't Matt now just tightly coupling his widgets with the provider?
The best Flutter duo
im in a constant pain
You can use your favorite search engine to search for it ;)
So now we can use provider instead of BLOC pattern ?
I'm switching to Provider from ScopedModel! So yeah
Yes, or use the provider to provide your block to your widget. pub.dev/packages/provider#-example-tab-
Provider vs ScopedModel??
Where can I learn more about nested notifiers? I really often need to update something small within my ViewModel rather than notifying that my entire ViewModel was changed
When people say BLoC, do they mean flutter_bloc or old school bloc writing a bloc provider? flutter_bloc is indeed too complex.. old school bloc i think it is awesome, just needed some provider package to implement it without "hacks", or code downloaded from blogs.
I've found that most are referring to the flutter_bloc package when talking about BLoC which I find very confusing. I'm with you: I think the BLoC pattern is awesome and, if you're familiar with Rx, it's really straight forward.
which vs code package is using?
amazing share for provider .
Hello, please I want to know if it's okay to get a macbook pro with 8gb ram and 256ssd for flutter programming? Won't xcode and android studio run slowly on it?
You will be fine
I just read a chapter "Duplicate Observed Data" in the book "Refactoring" from 1999. As I understood this approach, it is super similar.
What plugin he just used?
This made me think. I’m not convinced with the provider package too.
I really think that Flutter team must find a better and simpler way for StateManagement. Flutter is great. I can develop and see the results really fast like never before.
Sometimes, providing many solutions is bad.
Especially in this video, even though the first approach was not good according to the Flutter team, I’d rather using it. At least the children widgets don’t have to be descendants of the same widget in the tree.
These are my thoughts relative to my knowledge.
One of the best tech reviewing videos i have ever seen. ❤
Thank you so much for the kind feedback, Heshan! We're so glad to hear you enjoyed this 😎
so now we are going to use Hooks and functional widgets, right?
Good video for how to use and link stateful widgets. Thanks a lot!
Oh. We have new name of scoped model?
عاشت الايادي يابه
release flutter for desktop with firebase and firestore feature plugins
Verry nice, thank so much 🥳🥳🥳
The notifyListeners() does not work when called from inside an async operation like fetching data from network.
Good talk. I'm new to Flutter, and since I come from a React background I used Redux for my first Flutter project. It's working just fine, but I'm not entirely sure what the best practices of initial data fetching in Flutter are. How is everybody fetching initial data?
Im also curious about this... in initState() i am sometimes calling 3+ async methods and im not sure if i should chain them and call setState() at the end or use some other approach...
I am using bloc, for global state management..it gives complete control on initial state
I have an question, that I have 0 experience in programming language and I want to build the app for my startup, I willing to go learning with flutter, still I can make the apps development with flutter course only?
You can, I did for my Startup. But it will take time, start with small apps and then Scale. And don't worry if the very first version you make isn't the best as it's the First not the last 🙂.
how if i have some routes, and i want to pass the provider to them?? so on destination route i just call the Provider.of(context)
i watched this piece and really love it.. the delivery and explanation of the concept was top notch. this will definately help and aid my journey of becoming a flutter developer. thank you google