getDependencies method
Requests all dependencies of the specified type asynchronously, with caching. @param {string} type @return {Promise<Array
Implementation
Future<List> getDependencies(String type) async {
final dependencies = cache.get(type);
if (dependencies != null) {
return dependencies;
}
final defs = json[type + (type == 'mesh' ? 'es' : 's')] ?? [];
List otherDependencies = [];
int l = defs.length;
for (int i = 0; i < l; i++) {
final dep1 = await getDependency(type, i);
otherDependencies.add(dep1);
}
cache.add(type, otherDependencies);
return otherDependencies;
}