isAsyncOrHasAsyncDependency function Null safety

bool isAsyncOrHasAsyncDependency(
  1. InjectedDependency iDep,
  2. Set<DependencyConfig> allDeps
)

Implementation

bool isAsyncOrHasAsyncDependency(
    InjectedDependency iDep, Set<DependencyConfig> allDeps) {
  final dep = lookupDependency(iDep, allDeps);
  if (dep == null) {
    return false;
  }

  if (dep.isAsync && !dep.preResolve) {
    return true;
  }

  return hasAsyncDependency(dep, allDeps);
}