Registers the exact same instance created by a TTarget dependency
under an additional key TAlias - typically a superclass or an
interface TTarget implements - so it can also be looked up as
TAlias: deps.get<TAlias>() and deps.get<TTarget>() return the
identical object.
A ListenableDependency specialized for ChangeNotifier: unlike the
base class, this defaults dispose to calling value.dispose(), since
every ChangeNotifier supports that.
A snapshot of a single registered dependency's descriptor and current
resolution state, for inspection/diagnostics only - see
Deps.debugOwnDependencies, which is what flutter_lean_di's
diagnostics extensions build on to show a Deps hierarchy.
Event emitted by Deps when a dependency is registered. Dependencies are
created lazily, so its value may not exist yet - once Dependency.create
runs, it will be followed by a DependencyChanged event.
A box that contains dependencies. Deps can also form a tree-like hierarchy
to allow for scoping and overriding dependencies. Reading values from
a deps object that it doesn't contain but its ancestors will return
the value from the nearest ancestor.
Passed to Dependency.create instead of a plain Deps - reads made
through it are how a dependency declares what it reacts to, instead of a
separate, easy-to-forget list.
A Dependency whose value is a Listenable - deps.watch<T>() (and
context.watch<T>()) reacts to T calling notifyListeners(), not just
to a new instance being registered. Not every Listenable is disposable,
so unlike ChangeNotifierDependency this has no default dispose.
Turns a Deps scope into something Flutter's diagnostics tooling can
display - the widget inspector, debugDumpApp()-style tools, or just
debugPrint(deps.toDiagnosticsNode().toStringDeep()) for a quick dump
from anywhere.
Deps.watchInstance-based helpers for watching several dependencies at
once - watch2 through watch5 cover the common fixed-arity cases;
watchMany is the general, dynamic-arity version they're built on.
Enables tracking of a Deps scope's child scopes (created via
Deps.fork) purely for inspection - see Deps.debugChildren, and
flutter_lean_di's diagnostics extensions for viewing a whole hierarchy.
Thrown when resolving key re-enters its own Dependency.create before
the first call has finished - i.e. a dependency, directly or indirectly,
depends on itself.
Thrown when an operation needs this Deps scope to still be alive, but
Deps.dispose has already been called on it - by Deps.add (adding to a
disposed scope makes no sense) and by Deps.get/Deps.tryGet (resolving
a value from a scope whose dependencies have all been torn down doesn't
either).