Would you recommend Blocs for those that are new to working in Flutter? I can see the easier traceability and testing/mocking to be helpful for a new Flutter Dev but, most likely, the app will be simple so that may be an argument for Cubits.
The structure of blocs helps me plan and reason with my code's flow so I greatly prefer them to cubits but I do think for small apps, cubits can work just as well. When I first started building the project I showed at the end, I had actually used Provider (another state management solution) and rolled my own "view model" type approach. What I ultimately found is that I had done several things wrong and there were pretty significant performance applications with my approach -- which ultimately prompted me to give Bloc a shot. All this to say: You are probably fine with Bloc, Cubit, Provider or anything else as long as you're structured with it and fully understand how it works. As for a recommendation, I'd start with cubits if you want to use Bloc (the package) and evaluate regularly how its going.
Whatever makes the most sense for your team given the context they’re operating in! If that’s not helpful though, I’d recommend starting with Bloc and giving that a try first!
this is very useful info, thank you!
Glad it was helpful!
Thank You 💯
Happy to help!
Would you recommend Blocs for those that are new to working in Flutter? I can see the easier traceability and testing/mocking to be helpful for a new Flutter Dev but, most likely, the app will be simple so that may be an argument for Cubits.
The structure of blocs helps me plan and reason with my code's flow so I greatly prefer them to cubits but I do think for small apps, cubits can work just as well. When I first started building the project I showed at the end, I had actually used Provider (another state management solution) and rolled my own "view model" type approach. What I ultimately found is that I had done several things wrong and there were pretty significant performance applications with my approach -- which ultimately prompted me to give Bloc a shot.
All this to say: You are probably fine with Bloc, Cubit, Provider or anything else as long as you're structured with it and fully understand how it works. As for a recommendation, I'd start with cubits if you want to use Bloc (the package) and evaluate regularly how its going.
Can we create generic bloc or states so we don't have to define that loading loaded and failure state in every bloc?
You can define a generic state and event, if you’d like! You’d just need to handle that as you would the non-generic classes
Hi, I`ts very good your tutorials, do you plan to make more videos showing bloc examples app?
I certainly can! I’ve been making a list of some things that I think I’d be good at covering. I’ll add more Bloc stuff to the list!
What should choose
Whatever makes the most sense for your team given the context they’re operating in!
If that’s not helpful though, I’d recommend starting with Bloc and giving that a try first!
what about riverpod
I’ll add it to the list!
Any Link For This Project ?
This is actually a private project of mine that I attempt to live off of so the source is not available here. Sorry!
@@BradCypert No worries i completely agree on this👍🏻