Describes at compile-time configuring to return an instance of a
T is provided (i.e. not
dynamic), it must be the same as token.
A class that provides itself:
A class that provides itself with a different implementation:
const ClassProvider(Service, useClass: CachedService);
Optional; dependencies to inject and provide when invoking useFactory.
- hashCode → int
The hash code for this object. [...]
- multi → bool
Whether to treat this provider as a "multi" provider (multiple values). [...]
- runtimeType → Type
A representation of the runtime type of the object.
- token → Object
Key used for injection, commonly a
Typeor OpaqueToken.final, inherited
- useClass → Type
Class whose constructor should be invoked when token is injected. [...]
- useExisting → Object
An existing token to redirect to when token is injected. [...]
- useFactory → Function
A factory function to invoke when token is injected. [...]
- useValue → Object
Constant value to use when token is injected. [...]