skipDependencyCycle method

bool skipDependencyCycle(
  1. Injector injector,
  2. List<InjectorKey> futurePromises
)

Returns if the DarwinSystemServiceMixin should wait another dependency cycle before trying to create this service, either because it is currently lacking required dependencies, or optional dependencies are still being possibly promised by futurePromises.

Implementation

bool skipDependencyCycle(
        Injector injector, List<InjectorKey> futurePromises) =>
    !isSatisfied(injector) ||
    collectOptionalDependencies()
        .any((element) => futurePromises.contains(element));