DependencyContainer / DependencyModule abstraction, with a get_it-backed implementation. Part of the modular-flutter-template core modules.
Two packages:
dependency_injection_api— the abstract contract. Feature code and other_apipackages depend on this, never ondependency_injection_impl.dependency_injection_impl— the concrete implementation. Only the app's composition root depends on this.
Workspace packages: depend on them by name, with no source:
dependencies:
dependency_injection_api:
dependency_injection_impl: # the app's composition root onlyResolved with the rest of the workspace: run flutter pub get at the repo
root. Tests run with the others through dart run melos test.