InjectorBuilder class abstract
Defines the interface for building and registering services within a dependency container.
Constructors
- InjectorBuilder()
-
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
build(
) → Future< Injector> - Builds and returns an immutable Injector instance.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerAsyncFactory<
T> (AsyncFactory< T> factory, {AsyncPostCreate<T> ? onCreate, String? name}) → void -
Registers an async factory that creates a new instance of
Tevery time it is resolved using Injector.getAsync. -
registerAsyncSingleton<
T> (AsyncFactory< T> factory, {AsyncPostCreate<T> ? onCreate, String? name}) → void -
Registers an async factory that creates a shared singleton instance of
T. -
registerEagerSingleton<
T> (AsyncFactory< T> factory, {AsyncPostCreate<T> ? onCreate, String? name}) → void - Registers an eager singleton that is resolved immediately during the build phase.
-
registerFactory<
T> (Factory< T> factory, {PostCreate<T> ? onCreate, String? name}) → void -
Registers a factory that creates a new instance of
Tevery time it is resolved. -
registerInstance<
T> (T instance, {String? name}) → void - Registers an existing instance directly into the container.
-
registerSingleton<
T> (Factory< T> factory, {PostCreate<T> ? onCreate, String? name}) → void -
Registers a factory that creates a shared singleton instance of
T. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited