DI class final
- Available extensions
Constructors
- DI()
Properties
-
childrenContainer
↔ Option<
DI> -
Container for child DI instances. Production code should not mutate
this field directly —
registerChildis 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 registeredMyServicesynchronously 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 iteratingchildren()from_maybeFinishcannot force-construct unrelated children. Snapshotted to survive re-entrant register/unregister.inherited -
cleanupCompleters(
Entity typeEntity, {required Entity groupEntity}) → void -
Removes matching completers for
typeEntityingroupEntityand 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, orNoneif 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
groupEntitywrapped in aResult, orNoneif no child is registered. TheResultcarries anErrif child construction failed.inherited -
getChildOrNone(
{Entity groupEntity = const DefaultEntity()}) → Option< DI> -
Returns the child registered under
groupEntity, orNoneif no child is registered or it failed to construct.inherited -
getChildT(
{Entity groupEntity = const DefaultEntity()}) → Option< Result< DI> > -
Type-keyed variant ofgetChild.inherited -
getDependency<
T extends Object> ({Entity groupEntity = const DefaultEntity(), bool traverse = true, Set< DI> ? visited}) → Option<Result< Dependency< >T> > -
Retrieves the underlying
Dependencyobject from the registry. Iterative DFS — seeisRegistered.inherited -
getDependencyK<
T extends Object> (Entity typeEntity, {Entity groupEntity = const DefaultEntity(), bool traverse = true, Set< DI> ? visited}) → Option<Result< Dependency< >T> > -
Retrieves the underlying
Dependencyobject.inherited -
getDependencyT<
T extends Object> (Type type, {Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Option< Result< Dependency< >T> > -
Retrieves the underlying
Dependencyobject.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
Noneif 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
Noneif 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
Noneif 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
Whetherpluginis currently installed in this scope. -
installPlugin(
Plugin plugin) → Resolvable< DI> -
Available on DI, provided by the PluginHostX extension
Installsplugininto a fresh child scope of this container keyed byplugin.id. Returns the child DI holding the plugin's registrations. -
isChildRegistered(
{Entity groupEntity = const DefaultEntity()}) → bool -
Children are registered as
Lazy<DI>(seeregisterChild), 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 ofisChildRegistered. 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
Tis registered ingroupEntity. Strict: aLazy<T>registration does NOT count here — callers wanting that must checkisRegistered<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
typeEntityis registered. Strict: aLazy<...>variant is NOT matched — passTypeEntity(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
untilExactlyKcalls for the given type and group. Matches ontypeEntityonly —is Foo<T>collapses tois 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< onRegister = const None(), Option<T> >TOnUnregisterCallback< onUnregister = const None(), Entity groupEntity = const DefaultEntity(), bool enableUntilExactlyK = false}) → Resolvable<T> >T> -
Registers a dependency with the container.
inherited
-
registerAndInitService<
TService extends ServiceMixin> (TService service, {Option< TOnRegisterCallback< onRegister = const None(), Option<TService> >TOnUnregisterCallback< onUnregister = const None(), Entity groupEntity = const DefaultEntity(), bool enableUntilExactlyK = false}) → Resolvable<TService> >Unit> -
Registers
serviceand 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 tothisas its parent.inherited -
registerConstructor<
T extends Object> (FutureOr< T> constructor(), {Option<TOnRegisterCallback< onRegister = const None(), Option<Lazy< >T> >TOnUnregisterCallback< onUnregister = const None(), Entity groupEntity = const DefaultEntity()}) → Resolvable<Lazy< >T> >Lazy< T> > -
Registers a lazy dependency.
inherited
-
registerDependency<
T extends Object> ({required Dependency< T> dependency, bool checkExisting = false}) → Result<Dependency< T> > -
Registers a
Dependencyobject directly into the registry.inherited -
registerDependencyK<
T extends Object> ({required Dependency< T> dependency, bool checkExisting = false}) → Result<Dependency< T> > -
Retrieves the underlying
Dependencyobject.inherited -
registerLazy<
T extends Object> (LazyConstructor< T> constructor, {Option<TOnRegisterCallback< onRegister = const None(), Option<Lazy< >T> >TOnUnregisterCallback< onUnregister = const None(), Entity groupEntity = const DefaultEntity()}) → Resolvable<Lazy< >T> >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
typeEntityfrom the registry. Strict: aLazy<...>variant is NOT matched here — callers wanting that must passTypeEntity(Lazy, [typeEntity])explicitly. Mirrors the keying contract ofsetDependency.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
groupEntitycomplete, or every group whengroupEntityis None.inherited -
toString(
) → String -
A string representation of this object.
inherited
-
uninstallPlugin(
Plugin plugin) → Resolvable< Unit> -
Available on DI, provided by the PluginHostX extension
Uninstallsplugin: invokes Plugin.uninstall, tears down every dependency in its child scope (cascadingServiceMixin.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< onBeforeUnregister = const None(), Option<Dependency< >Object> >TOnUnregisterCallback< onAfterUnregister = const None(), Option<Dependency< >Object> >bool Function(Dependency< condition = const None()}) → Resolvable<Object> )>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 ofunregisterChild.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 fortraverse,removeAll, andtriggerOnUnregisterCallbacks.inherited -
until<
TSuper extends Object, TSub extends TSuper> ({Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Resolvable< TSub> -
Waits until a dependency of type
TSuperor its subtypeTSubis registered.TSupershould 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
typeEntityis registered. The result is cast toT.inherited -
untilExactlyT<
T extends Object> (Type type, {Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Resolvable< T> -
Waits until a dependency with the exact
typeEntityis registered. The result is cast toT.inherited -
untilFactory<
TSuper extends Object, TSub extends TSuper> ({Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Resolvable< TSub> -
Waits until a dependency of type
TSuperor its subtypeTSubis registered.TSupershould 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
TSuperis registered.TSupershould 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
TSuperis registered.TSupershould 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
TSuperis registered.TSupershould 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 ontypeEntity(K is exact-only by design — seeuntilSuperK) and casts the resolved value toTSub. The compile-timeTSub extends TSuperbound mirrors the plain API; at runtime it is a straight downcast through.transf<TSub>(). RequiresenableUntilExactlyK: trueat 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
TSuperor its subtypeTSubis registered.TSupershould 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
registerand set its parameterenableUntilExactlyKto 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
registerand set its parameterenableUntilExactlyKto 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
TSuperor its subtypeTSubis registered.TSupershould 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
TSuperis registered.TSupershould 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
TSuperis registered.TSupershould 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
TSuperis registered.TSupershould 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
TSuperis registered.TSupershould 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
TSuperis registered.TSupershould 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
untilExactlyKthat exists for naming-symmetry with the plainuntilSuper<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'stypeEntitymust equal the one passed in. Still requiresenableUntilExactlyK: trueat registration time.inherited -
untilSuperT<
T extends Object> (Type type, {Entity groupEntity = const DefaultEntity(), bool traverse = true}) → Resolvable< T> -
Alias for
untilExactlyTthat exists for naming-symmetry with the plainuntilSuper<T>track. The T (Type-keyed) track is exact-match by design (aTypeis wrapped in aTypeEntityand looked up by equality), so "Super" here is purely an API-naming convenience — subtype relationships between Dart types are NOT considered. RequiresenableUntilExactlyK: trueat 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 ontype(T is exact-only by design — seeuntilSuperT) and casts the resolved value toTSub. RequiresenableUntilExactlyK: trueat 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