GetContainer class

An isolated dependency injection container.

Encapsulates dependency registration, resolution, and lifecycle disposal, allowing multiple isolated DI contexts (e.g. for multi-window applications, modular subtrees, or concurrent unit test isolation).

Constructors

GetContainer()

Properties

factories → Map<String, InstanceBuilderFactory<Object?>>
All factories currently registered in this container.
no setter
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

delete<S>({String? tag, bool force = false}) → Future<bool>
Deletes a registered dependency.
find<S>({String? tag}) → S
Retrieves an instance of type S.
isPrepared<S>({String? tag}) → bool
Checks if an instance of S has been initialized.
isRegistered<S>({String? tag}) → bool
Checks if an instance of S is registered.
lazyPut<S>(InstanceBuilderCallback<S> builder, {String? tag, bool fenix = false}) → void
Lazily registers an instance builder.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
put<S>(S dependency, {String? tag, bool permanent = false}) → S
Injects an existing dependency dependency into this container.
reset() → void
Clears all registered instances, invoking onDelete() on active lifecycles.
toString() → String
A string representation of this object.
inherited

Operators

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