#10 - Bloc State Not Updating - Comparing 2 objects in Dart, Equatable Package, How to Fix Issue

preview_player
Показать описание
Hi there!

Here's the github repository where you can clone all the source code:

In this tutorial I will explain to you why it's important to understand how Dart compares 2 objects in different scenarios. Understanding this will eventually help you fix a well-known issue some of the new bloc users encounter while working on their projects - the problem in which the state of a bloc/cubit won't update anymore. We'll take a look over the most frequent mistakes users make regarding this topic. As a bonus, I'll introduce you to Equatable package! Enjoy!

You can contact me directly here:

Also, if you want to support me furthermore you can become an YouTube Member, donate or buy my courses on Udemy, using the following links:

Рекомендации по теме
Комментарии
Автор

till 2024, there is no best tutorial elaborates bloc concepts clearly as this tutorial. Keep up going!

bayanhoms
Автор

WCKD is a lifesaver 😍. I was so frustrated with the State Not Updating thing and Now I know the correct way to do it. I am glad I had notifications turned on 🙌.

muhammadshahzadakram
Автор

you content so underrated. so i decide to write comment with nice length to support you. keep going u do a great work for all flutter community!

Tokieejke
Автор

This video is a lifesaver i was mutating the state the whole time and asking my self why the UI not working
Thanks man for saving me you desurve my like and subscribe ❤

opressedrage
Автор

These are by far the most informative Flutter state management tutorials, looking forward to more content from you.

williammutua
Автор

By far one of the most useful tutorial series I've every watched for flutter! 💙 Please keep up this great work at this excellent quality. I've "binge watching" this tonight, could not stop at all 😉

Personally I'm using BLoC now for more or less one year, also productive, but still, there are so many helpful informations in your tutorials.
 
Some interesting topics for me (and I can imagine also for other people) would be:
* Explain why the class in a bloc state is "abstract" and whats the difference between abstract and non abstract?
* Is it okay to use context.watch() really often in one page? like 20 - 30 times? Or does this impact the performance of an app?
* Should I now generally prefer using context.watch over a BlocBuilder?

I can't wait to get to the next tutorial, and maybe soon to the Bloc tutorials with Event Streams.
Thanks a lot for sharing your knowledge!

MikeKeiler
Автор

Thank you for these great tutorials. I spent so much time to understand and deal with unexpected output/errors, finally, thises video cleared ally my misconception of the flutter_blok package. keep it up.

askarmus
Автор

Thanks a lot sir, for educating us with your valuable content, even now {after 3 years}, It was a treasure for us

abhishekreddy
Автор

🔥🔥🔥🔥🔥🔥🔥 I am so much grateful to you. ❤️ Much much love from India. You are a life saver.

iNFiNiTY-yfrk
Автор

Thanks for this great tutorial! BTW, what extensions do you use in the vscode for equality and copyWith generation?

dutnorshi
Автор

Hey thanks for your wonderful tutorial, but I have got a question.
Should we use equatable along with copyWith function for comparing our states? I am not sure why Equatable is neccessary here if Dart compares the instance by object instead of values by default. Whenver we create a new state instance by copyWith function, wouldn't Dart be able to compare already? It seems like it works as charm even if you didn't extend equatable from the tutorials above. Thank you

jjsportify
Автор

Your content is too good man!! Thank you so much!! You are life saver!!

TalksFromCar
Автор

Thanks a lot ! this is really a great way of explaining how things work !

ddbonpc
Автор

Hi Flutterly, Am facing issue with state update using bloc pattern. I have followed all the possibilities as you mentioned in the video like extending equatable and declaring all the properties in the state. but still am facing the same issue. Could you please help me out on this some how if possible.

mallikarjunreddy
Автор

Thanks for this awesome video! I am looking forward to the next ones 😀

jns
Автор

You are the I wish I could give you Giulia Quadrifoglio :D

batuhankrbb
Автор

i do want to emit 2 states tho
example. i delete with 1 button 2 objects,
for each deleted object i want to show a bottom sheet for the user to review the object, so i emit 2 objects so 2 bottom sheets show up.
unfortunately the second emition closes the first bottom sheet.

Автор

hey thank you for make this videos

but i have question

i have case that i need change frequently list in my app
but when i emitting the state of my list i need to move the value to the new list because list is mutable

i try to not put my list inside props but like in your video i need to put all my field inside list porps

is there a way that i can still emitting my list without move to new list but still extends equatable ?

MuhammadRizki-clru
Автор

Meen, this video releaved me of several hours of trouble

joshuanwokoye
Автор

I am extending Equatable in my state class AND emitting a NEW state but still nothing happens, what is the issue in this case?

mcop