provideUntyped<T> method
Injects and returns an object representing token
.
If the key was not found, returns orElse
(default is null
).
NOTE: This is an internal-only method and may be removed.
Implementation
@protected
T provideUntyped<T>(
Object token, [
Object? orElse = throwIfNotFound,
]) {
errors.debugInjectorEnter(token);
var result = injectFromSelfOptional(token, orElse);
if (identical(result, orElse)) {
result = injectFromAncestryOptional(token, orElse);
}
errors.debugInjectorLeave(token);
return unsafeCast(result);
}