Describes at compile-time how an
Injector should be configured.
Loosely put, a Provider is a binding between a token (commonly either
Type or OpaqueToken), and an implementation that is provided either by
invoking a constructor, a factory function, or referring to a literal value.
NOTE: The fields in this class are soft deprecated, and should not be inspected or accessed at runtime. Future implementations may optimize by removing them entirely.
Optional; dependencies to inject and provide when invoking useFactory.
- multi → bool
Whether to treat this provider as a "multi" provider (multiple values). [...]
- token → Object
Key used for injection, commonly a
- 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. [...]
- hashCode → int
The hash code for this object. [...]
- runtimeType → Type
A representation of the runtime type of the object.