#3 - Flutter BLoC Concepts - BlocProvider, BlocBuilder, BlocListener | BLoC - from Zero to Hero
Вставка
- Опубліковано 18 вер 2024
- Hi there!
Today we will take a look at all of the flutter_bloc concepts like BlocProvider, BlocBuilder, BlocListener, RepositoryProvider, MultiBlocProvider, MultiBlocListener, MultiRepositoryProvider.
The project files can be found on my GitHub Repository here: github.com/The...
All animations were done in VideoScribe, you can try it by clicking my affiliate link --- www.awin1.com/...
You can contact me directly here:
Join my Discord Server --- / discord
Twitter --- / letsgetwckd
Instagram --- / letsgetwckd
Also, if you want to support me furthermore you can become an UA-cam Member, donate or buy my courses on Udemy, using the following links:
Become an Official UA-cam Member! ---- / flutterly
Buy my Udemy Courses! ---- www.udemy.com/...
Support me on Revolut! ---- revolut.me/let...
Buy me a Ko-fi! --- ko-fi.com/wckdyt
Donate me on Paypal! --- www.paypal.me/...
Support me on Patreon! --- / wckdyt
Hello, everyone!
The entire course is now live on Udemy too, get it while it's hot --> www.udemy.com/course/bloc-from-zero-to-hero/?referralCode=E689592633984B34DBEF
Also I have just managed to finally finish the entire BLoC - From Zero to Hero Complete Course, based on this tutorial series. You can check it out here -> ua-cam.com/video/THCkkQ-V1-8/v-deo.html
does it have more information than this series?
Not really, it's just a much quicker way to access the chapters. Just like a cheatsheet.
Thank you
BlocProvider.of() called with a context that does not contain a CounterCubit.
No ancestor could be found starting from the context that was passed to
BlocProvider.of().
I'm facing this issue please help!!
Man, your tutorial is amazing. All the concepts you’ve explained so far, and made look simple, are the ones that usually make people afraid of using Bloc…
The best explaination in the planet, I watched more than 10 videos on bloc but was unable to understand until now
Thank you so much, mate! 🌟
🤣🤣🤣
Guys I request everyone here to go through entire series of his BLoC Concepts it's worth watching ... for sure you will get something out of it ... THE GREATEST SERIES on this topic.
Thank you so much! ✨ Appreciate it!
I'm still on 7 minutes of video but already had to pause and and come here to congratulate you for the amazing way to explain bloc.
Keep going and thanks for this video.
Thank you so much for your kind feedback, man! Really appreciate it! I'll keep them coming!
Guys this is the gem in learning about Bloc in Flutter...
Haha, thanks, the diamond 🔹
Much needed explonation! I was lost on flutter_bloc widgets for quiet long time until I found this guy explaining it so smoothly! man you area hero!
Thank you so much for your kind words!
Excellent explanation, the images help a lot and the examples in the code cover all the gaps that may exist. It seemed very complicated at first but I am already internalizing the basic concepts. Thanks for the videos, I look forward to more of this type!
Thank you so much for your extended feedback, glad I could help! More videos coming soon.
@@Flutterly why we use statefull instead of stateless
wow man this is impressed ! you are without a doubt gifted at teaching and presenting. Everybody can clearly see that you have taken a lot of time preparing everything. keep up the good work !
Thank you so much, haha, would call it gifted though. I just like sharing my knowledge with others, haha
OMG! I never understood BLoC ... and now, it's easy thanks to you!!!!! Amazing!
Thank you so much, I really appreciate it!
This video is pure gold.
Thank you so much!
I CANNOT THANKYOU ENOUGH FOR THESE TUTORIALS!!!!! I was so confused about this library, but you made this a piece of cake thanks a lot dude!
Thank you so much, I'm really glad my tutorials could help!
How did I not noticed this channel in my flutter journey?
Thank your for this amazing video :)
And please we want more video from you
It's a small channel, mate. Hopefully it will get bigger by time. More content is going to come soon.
I love you flutterly, what took me so late to find this channel,
How can one explain concept so good like this ?
YOU ARE THE BEST...
I'm sticking to this channel forever
Haha, thanks! 🌟 It's hard to find me since I'm a little channel right now, but hopefully I'll get bigger with time!
Excellent video explains the BLoC in best way, would love to see more such content on flutter architecture when starting new project.
That's exactly what the next video will be all about! Stay tuned!
You are a good teacher about blocProvider concepts, you make me understand. Thanks.
Thank you so much, I'm glad I could help!
Amazing tutorial, I'm using flutter bloc since 1.5 years, and your video helped me clear things up, every flutter dev must watch this video!! Thank you very much for your work!
You're very welcome!
Sir, you are incredible, I got goosebump because of your teaching way, it's really really great, I just want to say, you're a great teacher
Thank you so much for your kind words!
This course is gold! All my questions were answered by the end of it. Well done mate 👍
Thank you so much! Finally someone explaining concepts in-depth, visualizing them etc. Plus you know which questions to ask to understand everything.
Take love from Bangladesh. The easiest and simplest yet so elaborate tutorial on BLoC so far. Thanks a lot for this tutorial.
Thank you so much, man! I really appreciate all your kind words!
First time in my youtube life I have subscribed to a topic
Thank you very much for this series on Bloc! Best tutorial out there, great explanation and you answered all of the questions that were in my head :)
Thank you so much, glad you liked it! ♥
this whole playlist is amazing, really next level work. I love this playlist
Glad you enjoy it!
Very beautifully explained. This is the easiest explanation I found on the internet of bloc concepts
The best explanation of BLoC architecture I've seen. Thank you!
Glad it was helpful!
THANK YOU. This is the most comprehensive explanation of Blocs I've found... thank you for explaining this so well!
Such a good introduction. This was a great video and you definitely deserve more views/subs! 🎉
Thank you so much! Hopefully with time I'll have more views and subs!
this course must be paid , i'm happy to find it free on youtube
the best place to learn bloc .. thank you :D
Excellent!!! The right pace with the right amount of info. Tx
Thank you so much! ✨
The best explanation , I watched more than 100 videos on bloc but this is the best one i have got thank you very much waiting for new videos of yours
Glad you found my videos, mate! I appreciate your feedback!
This is the best explanation of bloc,... Keep up the good work.
I will, thanks!
Cannot be explained better than this..Great work.
Thank you so much! ✨
What a talented teacher you are.
Haha, thank you! For a moment I thought I received 10,199,100 views on a video haha 😂
@@Flutterly 😂😂😂😂😂😂😂
Awesome. Most Recommended Tutorials For BLoC.
Lol, if I had left to learn all of this from the docs it's would take me days. A quick easy 3 hours from you, make me understand all God bless you
Cant wait for next tutorial, you expain it so well.
Thank you so much! I'm working on it!
perfect. the best tutorial without a doubt on bloc. thank you.
Thank you for all the amount of content you are providing us for free
My pleasure!
This is the easiest explanation ever. You are godsent
Thank you so much! ✨
WOW!!! Such a brilliant presentation and explanation, You made it as easy as it possibly can be.
You should get million subs :)
Thank you so much for your kind words! It helps me a lot!
Best explanation i ever seen before.
Thank you, Ivan! Really appreciate it! ✨
👌👌👌👌👌👌👌👌 more videos like this...you R my university professor......
Thank you so much! More videos will come!
Wonderful Explanation.......the best best best of all.....
Thank you, so, so, so, much!
Amazing video great summarization of Block concepts in simple way 👏🏻👏🏻👏🏻👏🏻
Thanks a lot! I'll keep em coming,
This is the first video I have watched of yours. Saw many video , but it was difficult to understand . But your way of explanation is awesome which explains it very clear. Thanks a lot for making these videos. Inspired by your first video , I have subscribed to your channel.
Thank you so much! I really, really appreciate it!
These videos are super helpful bro. Thank you for making it easy to understand.
Thank you so much, brother, glad I could help!
you are really amazing and the best teacher on this topic i have ever see, thanks for sharing this man
An easy explanation to a hard concept. Thanks!
A truly very valuable tutorial series. Thank you very much!
You're welcome, thank you!
Thank you a lot for the tutorial. The best tutorial of bloc that i have see
Glad it helped! Thank you!
@@Flutterly Please can you explaint the different beetween BlocProvider and RepositoryProvider? How can i use it ?
Very clear explanation. Thank you!
Фильтр, конечно, моё почтение
Amazing Bloc series! Congrats on that and keep up the good work!!
Thank you so much, man! Really appreciate it!
whade best explained sir keep it u r good teacher 🎉🎉
I highly doubt the background voice is artificial.. probably AI powered voiceover ..but who cares cause the content is so great!! Thanks for making lives easier!! :)
Mate, it's just my voice haha, didn't have a great microphone back then. Take a look at newer videos haha, I guess my voice sounds better. 😂
@@Flutterly haha, lol actually it isn't just about the voice but you never get stuck or anything!! All I can say is brilliant!! Long way to go :)
Haha, well, the audio is well cut and processed before. I usually record at least 45 minutes of content and the final version has only around 30 minutes. That's why it seems like it's a big chuck of uninterrupted content. Thanks a lot for the feedback! ✨
So awesome! 😎
Thank you, you just earned a new subscriber. Congratulations
Thank you so much, I appreciate it!
love you man you are just amazing when it come to bloc library, state management and other Flutterly stuff.. respect man🎇🎇🎇✨✨✨🙌🙌🙌
Thank you so much! These concepts are very easy to understand with you!
Another excellent explanation - thank you!
Thank you so much! I appreciate every word!
Thank you. I will rewatch it in order understand better
Thank you so much for your time.
Wow! You're amazing! Keep on doing great stuff!!
Thank you so much, I will!
Love your tutorials! They are the best in the entire universe! =)
Thank you so much! ✨
you are such an excellent teacher for software thank you !
SUPERR AWESOME!
This course is sick!!!!
It is the best content in the field. Thank you
You're welcome, man!
bro you dont need to ask to give you a like ;) You deserve more then just like! best explanitaion!
That was one of the most helpful videos I have ever watched. 🚀🙏Love your visual details and style of teaching. Keep it up. #Flutter
OMG this is the best explanation ever
Literally killed the bloc bruhh great video. ❤️🔥❤️❤️❤️❤️
Thanks, bruh! Hugs and love 🔥
Really well made and cool video! Thanks!
Thank you so much! ✨ I really appreciate it
whan an amazing explanation given by you.. perfect video
You are doing a great job you will achieve a lot of fame
Thank you so much for your kind words! Really appreciate your feedback. Indeed it takes a lot of time to make this videos but I hope that in the end they'll be appreciated!
Pure information thx alot for the dark sode of the world
Excellent explanation,thanks
Beautiful playlist. 🙏
I love Flutter and I love BLoC.
Glad to hear that!
Good explanation...
Thank you mate, I appreciate it!
Excellent
Thanks a ton!
thank you for this tutorial it helped me a lot
Waiting for the next one
You're welcome, mate! I'm working on it, subscribe and activate the notification bell so that you won't miss it!
very cool video man good jobs
Really good video thank you !
You're welcome, glad I could help!
Thank you and need more videos
You're welcome! Yup, more tutorials will come
@@Flutterly you're save my life
could I get project that you're using BlocRepository? cos I really need this and can't understand In the documentation of that package
Unfortunately, no, it's a closed source project. You will understand more in the next video. It will come out soon
Awesome explanations! thank you !!
You're welcome!
nice! keep going. Looking forward for some more :)
Thank you!
Your explanation is massive, thanks a lot,
Just One question, which tool do you use to create videos like this one?
could you name it?
In comments !
The perfect tutorial really helped.
Thanks, brother! ✨
Excellent explanation, the best!!! Thanks :)
Thank you! I appreciate it! ♥
Hi Wckd, I have a question for you.
We use BlocProvider.value() when navigating to another screen because BuildContext will search for closest Navigator, upward to widget tree. And new screen will be children of MaterialApp finally. Unless we provide BlocProvider above MaterialApp, we cannot access to the bloc. Because our BuildContext's current location was changed. That's why providing BlocProvider.value is needed. And It basically wraps the navigated screen with the current instance of the bloc. It is just like to create a new BlocProvider but with an existance instance.
That's why we should close BlocProvider manually. Because in navigated screen we use only the current instance of the bloc. If we close it, it will be disposed in the first screen too.
Did I understand correctly? Or am I missing something else?
If the cubit/bloc instance was created primarily with the BlocProvider widget somewhere up in the widget tree, and then you used BlocProvider.value() to provide that instance furthermore to other screen/screens, then the thing is that you DON'T NEED TO CLOSE it in the dispose methods of these screens. That's because the instance has been initially provided by the BlocProvider() widget.
However, if you create the instance manually, e.g final WeatherBloc weatherBloc = WeatherBloc() somewhere at the beginning, and you use BlocProvider.value() to inject it into specific screens, then you WILL NEED TO CLOSE IT MANUALLY into the dispose methods of those screens. And that's only because you created it manually, as opposed to automatically via BlocProvider() in the previous example.
Hope you understood, if not, let me know here once again what are your concerns.
@@Flutterly Yes, I understood. But do you think in the right way in the first paragraph? Injection of existance Bloc to another screen is just like wrapping new screen with a current bloc instance. Just like we do it first place.
It doesn't matter, it depends on what you prefer. Both are fine as long as you take care of closing the bloc in the second scenario.
these vids makes me appreciate getx even more
its not as clean but something gotta give..
Thanks for the videos! great job man
Wow , thank you for your effort . keep going
Awesome stuff. Which vs-code theme are you using?
Haha, it's the default dark theme, but I add contrast into video post processing so that it looks darker haha
Class video!! What extension are you using in VSCode that provides the tree type dashed line structure in your widget class like at 12:03?
boy you are awesome
Thanks, brother! ✨
The best explanation i watch ever
but i have a little question i tried to move to another screen when i click on button and i wrap this button with BLOC builder and it pushed for one not multiple time but you said it will be pushed more then on time if you can answer me i will be thankful
awesome
Can't wait for the next tuts! Do you have a sched yet for future videos?
Thanks! I'm struggling to deliver top quality so each tutorial may take up to 1-2 weeks to be available. I'm planning on relasing the next one on Saturday or maybe Sunday this week. We'll see how it goes.
@@Flutterly oh definitely don't rush yourself. Quality over quantity always. Thanks for the time and effort!