DEV Community

Cover image for StateNotifier, an improved ChangeNotifier
Marcos Sevilla
Marcos Sevilla

Posted on • Updated on

StateNotifier, an improved ChangeNotifier

⚠️ This article was deprecated. ⚠️

Check out the updated full article on my personal blog.

You can find even more and keep in contact with me on my socials:

Top comments (2)

Collapse
 
robvirtuoso profile image
robvirtuoso

Too many options out there that are almost the same things, just called differently. I'm even tempted to just write my own, with an API that I like, and use that in all of my projects. But good to see efforts like this to simplify things. I honestly don't like the full BLoC format (event streams) of flutter_bloc, although Cubit is good and simple. I feel like explicit event streams is added convolution and produces code noise more than anything else.

Collapse
 
marcossevilla profile image
Marcos Sevilla

I agree, there are too many options and feel free to experiment for yourself to create the one you prefer. On the other hand, flutter_bloc is one of the best packages for state management, the good thing about it is that it abstracts the stream API (which you can also access if you want) so you technically don't work with streams directly, Cubits are mostly the same as StateNotifiers, just based on streams.