FactoryContainer class

Resolves installed declarations independently of a widget tree.

Constructors

FactoryContainer({List<FactoryModule> modules = const [], FactoryContainer? parent, List<Factory<Object>> local = const [], List<FactoryOverride> overrides = const [], FactoryObserver? observe})
Installs declarations locally and inherits unmodified values from parent.

Properties

exposedFactories → List<Factory<Object>>
Declarations made available to the adapter in this scope.
no setter
hashCode → int
The hash code for this object.
no setterinherited
parent → FactoryContainer?
The enclosing scope, if any.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

addListener(void listener(Factory<Object>)) → void Function()
Receives invalidations of resolved declarations; returns an unsubscribe.
close() → Future<void>
Closes child scopes and then this scope, attempting every cleanup callback.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
read<T extends Object>(Factory<T> factory) → T
Resolves a declaration in its owning scope.
setOverrides(List<FactoryOverride> overrides) → void
Replaces this scope's overrides as one change transaction.
toString() → String
A string representation of this object.
inherited

Operators

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