ExistingProvider<T extends Object> class
Describes at compile-time configuring to redirect to another token.
The provided token instead injects useExisting.
Commonly used for deprecation strategies or to-export an interface.
Constructors
- ExistingProvider(Type type, Object useExisting)
-
constfactory
-
ExistingProvider.forToken(OpaqueToken<
T> token, Object useExisting) -
constfactory
Properties
-
deps
→ List<
Object> ? -
Optional; dependencies to inject and provide when invoking useFactory.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- token → Object
-
Key used for injection, commonly a Type or OpaqueToken.
finalinherited
- useClass → Type?
-
Class whose constructor should be invoked when token is injected.
finalinherited
- useExisting → Object?
-
An existing token to redirect to when token is injected.
finalinherited
- useFactory → Function?
-
A factory function to invoke when token is injected.
finalinherited
- useValue → Object
-
Constant value to use when token is injected.
finalinherited
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