Interesting in development
depend: dependency management for Flutter
A library that prepares services and repositories before the app starts and gives access to them from anywhere in the widget tree.

Almost every Flutter app needs services and repositories that must be created before the first screen and passed down the widget tree. Without a shared approach, this setup spreads across the code, and releasing resources is easy to forget.
depend is built on InheritedWidget: dependencies are described in a DependencyContainer, created synchronously or asynchronously in a DependencyFactory, and provided through a DependencyScope with a placeholder while loading and error handling. The scope creates the container once and disposes of it when removed, and containers can be nested. For deferred creation there are LazyGet and LazyFutureGet, which create a service only on first access.
The library suits teams that want a predictable way to initialize services and pass them through the app. It can be added to existing code with minimal changes, and replacing dependencies through a factory helps in widget tests.
Open on pub.dev

