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

Constructors

GetItDIPlugin()

Properties

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 the specified Object type from the DI container.
override
has<T extends Object>({String? name}) bool
Checks if the instance of the specified Object 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
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.
override
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.
override
reset() Future<void>
Clears all the 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 Object type from the DI container.
override

Operators

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