Generic BloC Provider
If you’re using the BloC pattern to manage the state of your Flutter applications probably you’re tired of writing again and again your
BloC providers. I’ve just published a simple package called Generic BloC Provider that will help you with that.
Thank God we have generics!
If you’re not new to the BloC pattern probably you have also suffered the boilerplate associated to the
Maybe you have surrendered to the comodity of
copy & paste and you don’t care about this, but if you’re like me and you hate having repetitive code probably you have been creating your own generic implementation.
It’s something easy and it doesn’t require a lot of Flutter knowledge to build, but again, whenever you have to start a new project you may find yourself with your old friend
copy & paste copying your generic implementation from project to project, and maybe, improving it and mutating it along the way.
And that’s a complete waste of time.
That’s why I decided to publish a new package doing precisely that, a generic implementation of a
BloC provider naively called generic_bloc_provider.
Learning something new while at it
Some extra features
I’ve tried to let the user of the package customize some of the behaviors, namely:
the implementation of updateShouldNotify.
I hope you find it useful and, of course, feel free to open an issue or, better, a PR with some improvement in the Github’s repo.