DI class final

Available extensions

Constructors

DI()

Properties

childrenContainer ↔ Option<DI>
Container for child DI instances. Production code should not mutate this field directly — registerChild is the supported entry point.
getter/setter pairinherited
completersK → Map<Entity, List<ReservedSafeCompleter<Object>>>
Stores completers for untilExactlyK.
finalinherited
focusGroup ↔ Entity
A key that identifies the current group in focus for dependency management.
getter/setter pairinherited
hashCode → int
The hash code for this object.
no setterinherited
parents → Set<DI>
Parent containers.
finalinherited
registry → DIRegistry
Internal registry that stores dependencies.
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

call<T extends Object>({Entity groupEntity = const DefaultEntity(), bool traverse = true}) → T
Shorthand for getSyncUnsafe: di<MyService>() returns the registered MyService synchronously or throws if missing / async-only.
inherited
child({Entity groupEntity = const DefaultEntity()}) → DI
Returns the child container under groupEntity, registering one lazily if needed. This is the convenience entry point most callers reach for — DI.global, DI.session, DI.user, etc. all funnel through here.
inherited
children() → Option<Iterable<DI>>
Returns already-materialised children only — an un-read Lazy<DI> is skipped so iterating children() from _maybeFinish cannot force-construct unrelated children. Snapshotted to survive re-entrant register/unregister.
inherited
cleanupCompleters(Entity typeEntity, {required Entity groupEntity}) → void
Removes matching completers for typeEntity in groupEntity and bumps the registration epoch so any in-flight continuations re-wait instead of resolving against the now-gone registration.
inherited
get<T extends Object>({Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Option<Resolvable<T>>
Retrieves a dependency from the container.
inherited
getAsync<T extends Object>({Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Option<Async<T>>
Retrieves a dependency as Async<T> regardless of whether it was registered synchronously or asynchronously, or None if not found.
inherited
getAsyncK<T extends Object>(Entity typeEntity, {Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Option<Async<T>>
Retrieves an asynchronous dependency.
inherited
getAsyncT<T extends Object>(Type type, {Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Option<Async<T>>
Retrieves an asynchronous dependency.
inherited
getAsyncUnsafe<T extends Object>({Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Future<T>
Retrieves an asynchronous dependency unsafely, returning a future of the instance or throwing an error if not found.
inherited
getAsyncUnsafeK<T extends Object>(Entity typeEntity, {Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Future<T>
Retrieves an asynchronous dependency unsafely, returning a future of the instance, directly or throwing an error if not found.
inherited
getAsyncUnsafeT<T extends Object>(Type type, {Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Future<T>
Retrieves an asynchronous dependency unsafely, returning a future of the instance, directly or throwing an error if not found.
inherited
getChild({Entity groupEntity = const DefaultEntity()}) → Option<Result<DI>>
Returns the child registered under groupEntity wrapped in a Result, or None if no child is registered. The Result carries an Err if child construction failed.
inherited
getChildOrNone({Entity groupEntity = const DefaultEntity()}) → Option<DI>
Returns the child registered under groupEntity, or None if no child is registered or it failed to construct.
inherited
getChildT({Entity groupEntity = const DefaultEntity()}) → Option<Result<DI>>
Type-keyed variant of getChild.
inherited
getDependency<T extends Object>({Entity groupEntity = const DefaultEntity(), bool traverse = true, Set<DI>? visited}) → Option<Result<Dependency<T>>>
Retrieves the underlying Dependency object from the registry. Iterative DFS — see isRegistered.
inherited
getDependencyK<T extends Object>(Entity typeEntity, {Entity groupEntity = const DefaultEntity(), bool traverse = true, Set<DI>? visited}) → Option<Result<Dependency<T>>>
Retrieves the underlying Dependency object.
inherited
getDependencyT<T extends Object>(Type type, {Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Option<Result<Dependency<T>>>
Retrieves the underlying Dependency object.
inherited
getFactory<T extends Object>({Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Option<Resolvable<T>>
Retrieves the factory dependency.
inherited
getFactoryK<T extends Object>(Entity typeEntity, {Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Option<Resolvable<T>>
Retrieves the factory dependency.
inherited
getFactorySyncOrNone<T extends Object>({Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Option<T>
Retrieves the lazily loaded factory dependency unsafely, returning the instance as an Option.
inherited
getFactoryT<T extends Object>(Type type, {Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Option<Resolvable<T>>
Retrieves the factory dependency.
inherited
getFactoryUnsafe<T extends Object>({Entity groupEntity = const DefaultEntity(), bool traverse = true}) → FutureOr<T>
Retrieves the factory dependency unsafely, returning the instance directly or throwing an error if not found.
inherited
getFactoryUnsafeK<T extends Object>(Entity typeEntity, {Entity groupEntity = const DefaultEntity(), bool traverse = true}) → FutureOr<T>
Retrieves the factory dependency, returning the instance directly or throwing an error if not found.
inherited
getFactoryUnsafeT<T extends Object>(Type type, {Entity groupEntity = const DefaultEntity(), bool traverse = true}) → FutureOr<T>
Retrieves the factory dependency unsafely, returning the instance directly or throwing an error if not found.
inherited
getK<T extends Object>(Entity typeEntity, {Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Option<Resolvable<T>>
Retrieves the dependency.
inherited
getLazy<T extends Object>({Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Option<Resolvable<Lazy<T>>>
Retrieves the lazily loaded dependency.
inherited
getLazyFactorySyncOrNoneK<T extends Object>(Entity typeEntity, {Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Option<T>
Retrieves the lazily loaded factory dependency unsafely, returning the instance as an Option.
inherited
getLazyFactorySyncOrNoneT<T extends Object>(Type type, {Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Option<T>
Retrieves the lazily loaded factory dependency unsafely, returning the instance as an Option.
inherited
getLazyK<T extends Object>(Entity typeEntity, {Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Option<Resolvable<Lazy<T>>>
Retrieves the lazily loaded dependency.
inherited
getLazySingleton<T extends Object>({Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Option<Resolvable<T>>
Retrieves the lazily loaded singleton dependency.
inherited
getLazySingletonK<T extends Object>(Entity typeEntity, {Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Option<Resolvable<T>>
Retrieves the lazily loaded singleton dependency.
inherited
getLazySingletonSyncOrNone<T extends Object>({Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Option<T>
Retrieves the lazily loaded singleton dependency unsafely, returning the instance as an Option.
inherited
getLazySingletonSyncOrNoneK<T extends Object>(Entity typeEntity, {Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Option<T>
Retrieves the lazily loaded singleton dependency unsafely, returning the instance as an Option.
inherited
getLazySingletonSyncOrNoneT<T extends Object>(Type type, {Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Option<T>
Retrieves the lazily loaded singleton dependency unsafely, returning the instance as an Option.
inherited
getLazySingletonT<T extends Object>(Type type, {Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Option<Resolvable<T>>
Retrieves the lazily loaded singleton dependency.
inherited
getLazySingletonUnsafe<T extends Object>({Entity groupEntity = const DefaultEntity(), bool traverse = true}) → FutureOr<T>
Retrieves the lazily loaded singleton dependency unsafely, returning the instance directly or throwing an error if not found or not a singleton.
inherited
getLazySingletonUnsafeK<T extends Object>(Entity typeEntity, {Entity groupEntity = const DefaultEntity(), bool traverse = true}) → FutureOr<T>
Retrieves the lazily loaded singleton dependency unsafely, returning the instance directly or throwing an error if not found or not a singleton.
inherited
getLazySingletonUnsafeT<T extends Object>(Type type, {Entity groupEntity = const DefaultEntity(), bool traverse = true}) → FutureOr<T>
Retrieves the lazily loaded singleton dependency unsafely, returning the instance directly or throwing an error if not found or not a singleton.
inherited
getLazySyncOrNone<T extends Object>({Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Option<Lazy<T>>
Retrieves the lazily loaded dependency.
inherited
getLazySyncOrNoneK<T extends Object>(Entity typeEntity, {Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Option<Lazy<T>>
Retrieves the lazily loaded dependency.
inherited
getLazySyncOrNoneT<T extends Object>(Type type, {Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Option<Lazy<T>>
Retrieves the lazily loaded dependency.
inherited
getLazyT<T extends Object>(Type type, {Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Option<Resolvable<Lazy<T>>>
Retrieves the lazily loaded dependency.
inherited
getLazyUnsafe<T extends Object>({Entity groupEntity = const DefaultEntity(), bool traverse = true}) → FutureOr<Lazy<T>>
Retrieves the lazily loaded singleton dependency unsafely, returning the instance directly or throwing an error if not found or not a singleton.
inherited
getLazyUnsafeK<T extends Object>(Entity typeEntity, {Entity groupEntity = const DefaultEntity(), bool traverse = true}) → FutureOr<Lazy<T>>
Retrieves the lazily loaded dependency, returning the instance directly or throwing an error if not found.
inherited
getLazyUnsafeT<T extends Object>(Type type, {Entity groupEntity = const DefaultEntity(), bool traverse = true}) → FutureOr<Lazy<T>>
Retrieves the lazily loaded dependency, returning the instance directly or throwing an error if not found or not a singleton.
inherited
getSync<T extends Object>({Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Option<Sync<T>>
Retrieves a synchronous dependency.
inherited
getSyncK<T extends Object>(Entity typeEntity, {Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Option<Sync<T>>
Retrieves the synchronous dependency.
inherited
getSyncOrNone<T extends Object>({Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Option<T>
Retrieves a synchronous dependency or None if not found or async.
inherited
getSyncOrNoneK<T extends Object>(Entity typeEntity, {Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Option<T>
Retrieves the synchronous dependency or None if not found or async. Single exhaustive pattern collapses the Option × Resolvable × Result state space — every "not found / not sync / not ok" branch falls into the wildcard.
inherited
getSyncOrNoneT<T extends Object>(Type type, {Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Option<T>
Retrieves the synchronous dependency or None if not found or async.
inherited
getSyncT<T extends Object>(Type type, {Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Option<Sync<T>>
Retrieves the synchronous dependency.
inherited
getSyncUnsafe<T extends Object>({Entity groupEntity = const DefaultEntity(), bool traverse = true}) → T
Retrieves a synchronous dependency, returning the value directly. Throws if the dependency is missing, async-only, or resolved to Err.
inherited
getSyncUnsafeK<T extends Object>(Entity typeEntity, {Entity groupEntity = const DefaultEntity(), bool traverse = true}) → T
Retrieves the synchronous dependency unsafely, returning the instance directly.
inherited
getSyncUnsafeT<T extends Object>(Type type, {Entity groupEntity = const DefaultEntity(), bool traverse = true}) → T
Retrieves the synchronous dependency unsafely, returning the instance directly.
inherited
getT<T extends Object>(Type type, {Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Option<Resolvable<T>>
Retrieves the dependency.
inherited
getUnsafe<T extends Object>({Entity groupEntity = const DefaultEntity(), bool traverse = true}) → FutureOr<T>
Retrieves a dependency unsafely, returning the instance or a future of it, or throwing an error if not found.
inherited
getUnsafeK<T extends Object>(Entity typeEntity, {Entity groupEntity = const DefaultEntity(), bool traverse = true}) → FutureOr<T>
Retrieves a dependency unsafely, returning it directly or throwing an error if not found.
inherited
getUnsafeT<T extends Object>(Type type, {Entity groupEntity = const DefaultEntity(), bool traverse = true}) → FutureOr<T>
Retrieves a dependency unsafely, returning it directly or throwing an error if not found.
inherited
hasPlugin(Plugin plugin) → bool

Available on DI, provided by the PluginHostX extension

Whether plugin is currently installed in this scope.
installPlugin(Plugin plugin) → Resolvable<DI>

Available on DI, provided by the PluginHostX extension

Installs plugin into a fresh child scope of this container keyed by plugin.id. Returns the child DI holding the plugin's registrations.
isChildRegistered({Entity groupEntity = const DefaultEntity()}) → bool
Children are registered as Lazy<DI> (see registerChild), so probe for that exact key — isRegistered<DI> would not match under the strict-keying contract.
inherited
isChildRegisteredT({Entity groupEntity = const DefaultEntity()}) → bool
Type-keyed variant of isChildRegistered. Functionally identical — kept for naming-symmetry with the rest of the T-track API.
inherited
isRegistered<T extends Object>({Entity groupEntity = const DefaultEntity(), bool traverse = true, Set<DI>? visited}) → bool
Returns whether a dependency keyed under exact type T is registered in groupEntity. Strict: a Lazy<T> registration does NOT count here — callers wanting that must check isRegistered<Lazy<T>>(). Mirrors the keying contract of the registry's insert/remove.
inherited
isRegisteredK(Entity typeEntity, {Entity groupEntity = const DefaultEntity(), bool traverse = true, Set<DI>? visited}) → bool
Returns whether a dependency keyed under exact typeEntity is registered. Strict: a Lazy<...> variant is NOT matched — pass TypeEntity(Lazy, [typeEntity]) explicitly to check for that.
inherited
isRegisteredT(Type type, {Entity groupEntity = const DefaultEntity(), bool traverse = true}) → bool
Checks if a dependency is registered.
inherited
maybeFinishK<T extends Object>({required Entity g}) → void
Attempts to finish any pending untilExactlyK calls for the given type and group. Matches on typeEntity only — is Foo<T> collapses to is Foo<dynamic> under dart2js release and would mis-match.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
register<T extends Object>(FutureOr<T> value, {Option<TOnRegisterCallback<T>> onRegister = const None(), Option<TOnUnregisterCallback<T>> onUnregister = const None(), Entity groupEntity = const DefaultEntity(), bool enableUntilExactlyK = false}) → Resolvable<T>
Registers a dependency with the container.
inherited
registerAndInitService<TService extends ServiceMixin>(TService service, {Option<TOnRegisterCallback<TService>> onRegister = const None(), Option<TOnUnregisterCallback<TService>> onUnregister = const None(), Entity groupEntity = const DefaultEntity(), bool enableUntilExactlyK = false}) → Resolvable<Unit>
Registers service and drives its lifecycle:
inherited
registerChild({Entity groupEntity = const DefaultEntity()}) → Resolvable<Lazy<DI>>
Registers a fresh child DI container under groupEntity. The child is created lazily on first access and is wired to this as its parent.
inherited
registerConstructor<T extends Object>(FutureOr<T> constructor(), {Option<TOnRegisterCallback<Lazy<T>>> onRegister = const None(), Option<TOnUnregisterCallback<Lazy<T>>> onUnregister = const None(), Entity groupEntity = const DefaultEntity()}) → Resolvable<Lazy<T>>
Registers a lazy dependency.
inherited
registerDependency<T extends Object>({required Dependency<T> dependency, bool checkExisting = false}) → Result<Dependency<T>>
Registers a Dependency object directly into the registry.
inherited
registerDependencyK<T extends Object>({required Dependency<T> dependency, bool checkExisting = false}) → Result<Dependency<T>>
Retrieves the underlying Dependency object.
inherited
registerLazy<T extends Object>(LazyConstructor<T> constructor, {Option<TOnRegisterCallback<Lazy<T>>> onRegister = const None(), Option<TOnUnregisterCallback<Lazy<T>>> onUnregister = const None(), Entity groupEntity = const DefaultEntity()}) → Resolvable<Lazy<T>>
Registers a lazy dependency.
inherited
removeDependency<T extends Object>({Entity groupEntity = const DefaultEntity()}) → Option<Dependency<Object>>
Removes a dependency from the internal registry.
inherited
removeDependencyK<T extends Object>(Entity typeEntity, {Entity groupEntity = const DefaultEntity()}) → Option<Dependency<Object>>
Removes the dependency keyed under exact typeEntity from the registry. Strict: a Lazy<...> variant is NOT matched here — callers wanting that must pass TypeEntity(Lazy, [typeEntity]) explicitly. Mirrors the keying contract of setDependency.
inherited
removeDependencyT<T extends Object>(Type type, {Entity groupEntity = const DefaultEntity()}) → Option<Dependency<Object>>
Removes a dependency from the registry. Mirrors removeDependencyK — public on this track for parity with the plain and K variants.
inherited
resetLazySingleton<T extends Object>({Entity groupEntity = const DefaultEntity()}) → Resolvable<Unit>
Resets the singleton instance of a lazily loaded dependency.
inherited
resetLazySingletonK<T extends Object>(Entity typeEntity, {Entity groupEntity = const DefaultEntity()}) → Resolvable<Unit>
Resets the singleton instance of a lazily loaded dependency.
inherited
resetLazySingletonT<T extends Object>(Type type, {Entity groupEntity = const DefaultEntity()}) → Resolvable<Unit>
Resets the singleton instance of a lazily loaded dependency.
inherited
resolveAll({Option<Entity> groupEntity = const Some(DefaultEntity())}) → Resolvable<Unit>
Completes once all Async dependencies associated with groupEntity complete, or every group when groupEntity is None.
inherited
toString() → String
A string representation of this object.
inherited
uninstallPlugin(Plugin plugin) → Resolvable<Unit>

Available on DI, provided by the PluginHostX extension

Uninstalls plugin: invokes Plugin.uninstall, tears down every dependency in its child scope (cascading ServiceMixin.dispose() via the standard unregister hook), then drops the child scope itself.
unregister<T extends Object>({Entity groupEntity = const DefaultEntity(), bool traverse = true, bool removeAll = true, bool triggerOnUnregisterCallbacks = true}) → Resolvable<Option<T>>
Unregisters a dependency.
inherited
unregisterAll({Option<TOnUnregisterCallback<Dependency<Object>>> onBeforeUnregister = const None(), Option<TOnUnregisterCallback<Dependency<Object>>> onAfterUnregister = const None(), Option<bool Function(Dependency<Object>)> condition = const None()}) → Resolvable<Unit>
Unregisters all dependencies, optionally with callbacks and conditions.
inherited
unregisterChild({Entity groupEntity = const DefaultEntity()}) → Result<Option<DI>>
Children are registered as Lazy<DI>, so unregister must remove the lazy key — unregister<DI> would not match under the strict-keying contract.
inherited
unregisterChildT(Type type, {Entity groupEntity = const DefaultEntity()}) → Result<Option<DI>>
Type-keyed variant of unregisterChild.
inherited
unregisterK(Entity typeEntity, {Entity groupEntity = const DefaultEntity(), bool traverse = true, bool removeAll = true, bool triggerOnUnregisterCallbacks = true}) → Resolvable<Option<Object>>
Unregisters a dependency.
inherited
unregisterLazy<T extends Object>({Entity groupEntity = const DefaultEntity(), bool traverse = true, bool removeAll = true, bool triggerOnUnregisterCallbacks = true}) → Resolvable<Option<Object>>
Unregisters a lazily loaded dependency.
inherited
unregisterLazyK(Entity typeEntity, {Entity groupEntity = const DefaultEntity(), bool traverse = true, bool removeAll = true, bool triggerOnUnregisterCallbacks = true}) → Resolvable<Option<Object>>
Retrieves the lazily loaded singleton dependency.
inherited
unregisterLazyT(Type type, {Entity groupEntity = const DefaultEntity(), bool traverse = true, bool removeAll = true, bool triggerOnUnregisterCallbacks = true}) → Resolvable<Option<Object>>
Unregisters a lazily loaded dependency.
inherited
unregisterT(Type type, {Entity groupEntity = const DefaultEntity(), bool traverse = true, bool removeAll = true, bool triggerOnUnregisterCallbacks = true}) → Resolvable<Option<Object>>
Unregisters a dependency. Mirrors unregisterK's contract — see there for traverse, removeAll, and triggerOnUnregisterCallbacks.
inherited
until<TSuper extends Object, TSub extends TSuper>({Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Resolvable<TSub>
Waits until a dependency of type TSuper or its subtype TSub is registered. TSuper should typically be the most general type expected.
inherited
untilExactlyK<T extends Object>(Entity typeEntity, {Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Resolvable<T>
Waits until a dependency with the exact typeEntity is registered. The result is cast to T.
inherited
untilExactlyT<T extends Object>(Type type, {Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Resolvable<T>
Waits until a dependency with the exact typeEntity is registered. The result is cast to T.
inherited
untilFactory<TSuper extends Object, TSub extends TSuper>({Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Resolvable<TSub>
Waits until a dependency of type TSuper or its subtype TSub is registered. TSuper should typically be the most general type expected.
inherited
untilFactoryExactlyK<T extends Object>(Entity typeEntity, {Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Resolvable<T>
Waits until a dependency of type TSuper is registered. TSuper should typically be the most general type expected.
inherited
untilFactoryExactlyT<T extends Object>(Type type, {Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Resolvable<T>
Waits until a dependency of type TSuper is registered. TSuper should typically be the most general type expected.
inherited
untilFactorySuper<TSuper extends Object>({Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Resolvable<TSuper>
Waits until a dependency of type TSuper is registered. TSuper should typically be the most general type expected.
inherited
untilK<TSuper extends Object, TSub extends TSuper>(Entity typeEntity, {Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Resolvable<TSub>
Counterpart to until<TSuper, TSub> on the K (Entity-keyed) track. Waits exact-match on typeEntity (K is exact-only by design — see untilSuperK) and casts the resolved value to TSub. The compile-time TSub extends TSuper bound mirrors the plain API; at runtime it is a straight downcast through .transf<TSub>(). Requires enableUntilExactlyK: true at registration time.
inherited
untilLazy<TSuper extends Object, TSub extends TSuper>({Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Resolvable<Lazy<TSub>>
Waits until a dependency of type TSuper or its subtype TSub is registered. TSuper should typically be the most general type expected.
inherited
untilLazyExactlyK<T extends Object>(Entity typeEntity, {Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Resolvable<Lazy<T>>
You must register dependencies via register and set its parameter enableUntilExactlyK to true to use this method.
inherited
untilLazyExactlyT<T extends Object>(Type type, {Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Resolvable<Lazy<T>>
You must register dependencies via register and set its parameter enableUntilExactlyK to true to use this method.
inherited
untilLazySingleton<TSuper extends Object, TSub extends TSuper>({Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Resolvable<TSub>
Waits until a dependency of type TSuper or its subtype TSub is registered. TSuper should typically be the most general type expected.
inherited
untilLazySingletonExactlyK<T extends Object>(Entity typeEntity, {Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Resolvable<T>
Waits until a dependency of type TSuper is registered. TSuper should typically be the most general type expected.
inherited
untilLazySingletonExactlyT<T extends Object>(Type type, {Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Resolvable<T>
Waits until a dependency of type TSuper is registered. TSuper should typically be the most general type expected.
inherited
untilLazySingletonSuper<TSuper extends Object>({Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Resolvable<TSuper>
Waits until a dependency of type TSuper is registered. TSuper should typically be the most general type expected.
inherited
untilLazySuper<TSuper extends Object>({Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Resolvable<Lazy<TSuper>>
Waits until a dependency of type TSuper is registered. TSuper should typically be the most general type expected.
inherited
untilSuper<TSuper extends Object>({Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Resolvable<TSuper>
Waits until a dependency of type TSuper is registered. TSuper should typically be the most general type expected.
inherited
untilSuperK<T extends Object>(Entity typeEntity, {Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Resolvable<T>
Alias for untilExactlyK that exists for naming-symmetry with the plain untilSuper<T> track. On the K (Entity-keyed) track there is no subtype-matching — Entities are looked up by equality — so "Super" here is purely an API-naming convenience: the registered dependency's typeEntity must equal the one passed in. Still requires enableUntilExactlyK: true at registration time.
inherited
untilSuperT<T extends Object>(Type type, {Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Resolvable<T>
Alias for untilExactlyT that exists for naming-symmetry with the plain untilSuper<T> track. The T (Type-keyed) track is exact-match by design (a Type is wrapped in a TypeEntity and looked up by equality), so "Super" here is purely an API-naming convenience — subtype relationships between Dart types are NOT considered. Requires enableUntilExactlyK: true at registration time.
inherited
untilT<TSuper extends Object, TSub extends TSuper>(Type type, {Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Resolvable<TSub>
Counterpart to until<TSuper, TSub> on the T (Type-keyed) track. Waits exact-match on type (T is exact-only by design — see untilSuperT) and casts the resolved value to TSub. Requires enableUntilExactlyK: true at registration time.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Properties

dev → DI
A predefined container recommended for objects intended for development environments. This container is a child of root.
no setter
global → DI
A predefined container recommended for global dependencies. This container is a child of root.
no setter
prod → DI
A predefined container recommended for objects intended for production environments. This container is a child of root.
no setter
root → DI
A predefined container recommended for application-wide dependencies. This container serves as the parent for other containers.
final
session → DI
A predefined container recommended for session-specific dependencies. This container is a child of global.
no setter
test → DI
A predefined container recommended for objects intended for testing environments. This container is a child of root.
no setter
theme → DI
A predefined container recommended for theme-related objects. This container is a child of root.
no setter
user → DI
A predefined container recommended for user-specific dependencies. This container is a child of session.
no setter