hungps / flutter_pokedex

Pokedex app built with Flutter (with lots of animations) using Clean Architecture
https://hungps.com
Other
2.31k stars 562 forks source link

Migrate from riverpod to flutter_bloc #50

Closed hungps closed 2 years ago

hungps commented 2 years ago

riverpod + ChangeNotifier has been my main choice for state management for a long time because of its simplicity. But since v1.0.0, riverpod removing the syntax sugar context.read and required to extend the ConsumerWidget/ConsumerStatefulWidget instead, make the code heavily depends on riverpod. So I decided to let it go and find another state management, and the best state management so far is flutter_bloc.

By applying flutter_bloc, we can define the event as a use case, make the code easy to write unit tests and reduce the boilerplate.