gatherLicenses function
Gather all licenses of provided packages
This will inspect the locations of packages and try to find the corresponding license. The result will be a Map <Name, License text>.
Implementation
Future<Map<String, GatheredLicense>> gatherLicenses(
List<LocatedDependency> packages,
) async {
final located = FutureGroup<MapEntry<String, GatheredLicense>>();
for (final LocatedDependency package in packages) {
located.add(_gatherLicense(package));
}
located.close();
return Map.fromEntries(await located.future);
}