pubspecYamlHasAnyDependencies function

bool pubspecYamlHasAnyDependencies(
  1. Map yaml,
  2. List<String> dependencies
)

True if the pubspec.yaml has any of the dependencies

Handle dependencies like path, or 'direct:path', 'dev:path' or 'override:path'.

Implementation

bool pubspecYamlHasAnyDependencies(Map yaml, List<String> dependencies) {
  for (var dependency in dependencies) {
    if (_hasDependency(yaml, dependency)) {
      return true;
    }
  }
  return false;
}