injectFromAncestryOptional method

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

Injects and returns an object representing token from ancestors.

Unlike inject, this only checks instances registered with any ancestry injector, not this injector. This is equivalent to the constructor parameters annotated with @SkipSelf.


Object injectFromAncestryOptional(
  Object token, [
  Object orElse = throwIfNotFound,
]) =>
    parent.provideUntyped(token, orElse);