DependencyRegistration class
DependencyRegistration
is an abstract class that provides a common structure
for registering dependencies with the get_it
locator. Different subclasses
provide different registration methods, such as Singleton, LazySingleton, Factory, etc.
It contains several properties that subclasses can use to configure the registration:
-
classType
: The concrete class type that should be registered. -
asType
: An optional abstract type or interface thatclassType
can be registered as. -
resolveUsing
: An optional function to generate an instance ofclassType
. -
dispose
: An optional function that can be called to dispose of the registered instance. -
param1
,param2
: Optional types that can be used by a factory function to create an instance.
Constructors
Properties
- asType → Type?
-
An abstracted class type of service to register
final
- classType → Type?
-
The type of the service to register
final
- dispose → Function?
-
final
-
environments
→ Set<
String> ? -
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- instanceName → String?
-
final
- param1 → Type?
-
final
- param2 → Type?
-
final
- resolveUsing → Function?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
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