Future<ResourceManager> load()

Source

Future<ResourceManager> load() async {
  var futures = this.pendingResources.map((r) => r.complete);
  await Future.wait(futures);
  var errors = this.failedResources.length;
  if (errors > 0) {
    throw new StateError("Failed to load $errors resource(s).");
  } else {
    return this;
  }
}