load method

Future<ResourceManager> load ()

Implementation

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