Describes at compile-time using a constant value to represent a token.
const animationDelay = const OpaqueToken<Duration>('animationDelay'); const ValueProvider(animationDelay, const Duration(seconds: 1));
NOTE: The AngularDart compiler has limited heuristics for supporting
complex nested objects beyond simple literals, including collection literals
Map where you might expect specific reified types. If you
encounter problems it is recommended to use FactoryProvider instead.
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. [...]