InjectableFactory class

A factory responsible for creating instances of an injectable type.

An InjectableFactory describes what dependencies it needs, what scope it belongs to, and how to create the instance.

Properties

buildsType → String
The string representation of the type this factory builds.
final
dependencyData → DependencyData
The metadata describing the dependencies required by this factory.
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scope → InjectableScope
The scope in which the created instance should reside.
final

Methods

createInjectable(Dependencies dependencies) → Future<Object>
Creates a new instance of the injectable.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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

Static Methods

withDependencies<T extends Object>(DependencyData dependencyData, InjectableInstanceCreatorWithDependencies<T> creator, {InjectableScope? scope}) → InjectableFactory
Creates an InjectableFactory for a type that has dependencies.
withoutDependencies<T extends Object>(InjectableInstanceCreatorWithoutDependencies<T> creator, {InjectableScope? scope}) → InjectableFactory
Creates an InjectableFactory for a type that has no dependencies.