In this video you'll learn about the Bloc Library, Blocs and Cubits, and how to use Blocs in your Flutter application.
Пікірлер: 17
@hermionegreen33310 ай бұрын
this is very useful info, thank you!
@CodeWithCypert10 ай бұрын
Glad it was helpful!
@quicksketch16172 жыл бұрын
Hi, I`ts very good your tutorials, do you plan to make more videos showing bloc examples app?
@CodeWithCypert2 жыл бұрын
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!
@jakest.germain24752 жыл бұрын
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.
@CodeWithCypert2 жыл бұрын
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.
@karanparmar298 Жыл бұрын
Can we create generic bloc or states so we don't have to define that loading loaded and failure state in every bloc?
@CodeWithCypert Жыл бұрын
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
@mob_app_dev_ss2 жыл бұрын
What should choose
@CodeWithCypert2 жыл бұрын
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!
@merwen12 жыл бұрын
Thank You 💯
@CodeWithCypert2 жыл бұрын
Happy to help!
@benny-shen Жыл бұрын
what about riverpod
@CodeWithCypert Жыл бұрын
I’ll add it to the list!
@kartavyabagga2 жыл бұрын
Any Link For This Project ?
@CodeWithCypert2 жыл бұрын
This is actually a private project of mine that I attempt to live off of so the source is not available here. Sorry!
@kartavyabagga2 жыл бұрын
@@CodeWithCypert No worries i completely agree on this👍🏻