GetItDIPlugin class final
GetItDIPlugin is a class that is final and it extends the DIPlugin. It uses the 'GetIt' package to manage dependency injection in the project.
It has several methods to manage dependencies like: register a dependency, check if a dependency is already registered, unregister a dependency, etc.
- Inheritance
- Available extensions
Constructors
- GetItDIPlugin({String? debugLabel})
Properties
- debugLabel → String?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- name → String
-
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- title → String
-
finalinherited
Methods
-
dispose(
) → Future< void> -
override
-
get<
T extends Object> ({String? name}) → T -
Retrieves the registered instance of type
T
from the DI container.override -
getAsync<
T extends Object> ({String? name}) → Future< T> -
Available on DIPlugin, provided by the AsyncLazyDI extension
Retrieves an asynchronously initialized dependency from the dependency injection container. -
has<
T extends Object> ({String? name}) → bool -
Checks if an instance of the specified type is registered in the DI container.
override
-
init(
) → Future< void> -
override
-
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.
override
-
registerAsync<
T extends Object> (Future< T> fn(), {String? name}) → void -
Available on DIPlugin, provided by the AsyncLazyDI extension
Registers a lazily initialized asynchronous dependency in the dependency injection container. -
registerFactory<
T extends Object> (T fn(), {String? name}) → void -
Registers a factory function that produces a new instance each time it is called.
override
-
registerLazy<
T extends Object> (T fn(), {String? name}) → void -
Registers a function that produces an instance of any Object type.
override
-
reset(
) → Future< void> -
Clears all instances registered in the DI container.
override
-
toString(
) → String -
A string representation of this object.
inherited
-
unregister<
T extends Object> ({String? name}) → void -
Removes the instance of the specified type from the DI container.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited