provideUntyped method

  1. @protected
Object provideUntyped(
  1. Object token,
  2. [Object orElse = throwIfNotFound]
)
@protected, inherited

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
Object provideUntyped(
  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 result;
}