fromUrl static method

Future<ManifestStore?> fromUrl(
  1. String url, {
  2. String? format,
})

Creates a ManifestStore from a URL

Implementation

static Future<ManifestStore?> fromUrl(
  final String url,
  {final String? format,}
) async {
  // Get manifest from file bytes
  final manifestJson = await getManifestJsonFromURL(
    url,
    format: format,
  );

  // Check that the manifest was found
  if (manifestJson == null) {
    return null;
  }

  // Parse and return ManifestStore
  return ManifestStore.fromJson(json.decode(manifestJson));
}