getExternalJson method

Future<OffChainMetadata> getExternalJson()

Implementation

Future<OffChainMetadata> getExternalJson() async {
  final response = await http.get(Uri.parse(uri));
  if (response.statusCode != 200) {
    throw HttpException(response.statusCode, response.body);
  }

  return OffChainMetadata.fromJson(
    json.decode(response.body) as Map<String, dynamic>,
  );
}