getMetadataValue method

Future<String?> getMetadataValue(
  1. String key
)

Gets a metadata value by key.

Returns null when the attribute is not set.

final format = await artifact.getMetadataValue('format');

Implementation

Future<String?> getMetadataValue(String key) async {
  final response = await client.getAttribute(kref.uri, key);
  return response.value.isEmpty ? null : response.value;
}