Searching for Dependency Injection solutions for Flutter, I found two awesome libraries: provider
and get_it
.
As far as I can see, provid
The main difference between both is that provider
is not strictly dependency injection.
By using widgets, provider
is also able to:
All of these are, while optional, good for the health of your app in the long run.
It ensures that you're always up to date, makes it harder to have "spaghetti code", and makes your different elements more composable.