DIPlugin class abstract
DIPlugin
is an abstract class that extends the Plugin class.
It is associated with the Dependency Injection (DI) Plugin type and
includes methods for registering, unregistering, retrieving, and
checking the existence of instances in the DI container.
- Inheritance
- Mixed-in types
- Implementers
Constructors
Properties
Methods
-
dispose(
) → Future< void> -
inherited
-
get<
T extends Object> ({String? name}) → T - Retrieves the registered instance of the specified Object type from the DI container.
-
has<
T extends Object> ({String? name}) → bool - Checks if the instance of the specified Object type is registered in the DI container.
-
init(
) → Future< void> -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
register<
T extends Object> (T instance, {String? name}) → void - Registers an instance of any Object type with the DI container.
-
registerFactory<
T extends Object> (T fn(), {String? name}) → void - Registers a factory function that produces an instance of any Object type whenever it's called.
-
registerLazy<
T extends Object> (T fn(), {String? name}) → void - Registers a function that produces an instance of any Object type when called. The instance is created lazily, i.e., it is not created until it is required.
-
reset(
) → Future< void> - Clears all the instances registered in the DI container.
-
toString(
) → String -
A string representation of this object.
inherited
-
unregister<
T extends Object> ({String? name}) → void - Removes the instance of the specified Object type from the DI container.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited