fromLocalPath static method

ManifestStore? fromLocalPath(
  1. String localPath
)

Creates a ManifestStore from a local file path

Implementation

static ManifestStore? fromLocalPath(final String localPath) {
  // Get manifest from file bytes
  final manifestJson = getManifestJsonFromFile(
    localPath,
  );

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

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