Searching for Dependency Injection solutions for Flutter, I found two awesome libraries: provider
and get_it
.
As far as I can see, provid
Get It is not a dependency injection solution but a service locator.
It's useful if you want to rapidly switch between two or more implementations of a class. For example to mockup a service, and change between the "real" service or the fake one (for debugging purpose).
Indeed it can't retrieve/supply reference to an existing object (exception is for singleton, but you can do the same by yourself without much more effort) and can supply only new objects.