PreviewCredentialAttribute.fromJson constructor
PreviewCredentialAttribute.fromJson(
- dynamic jsonObject
Implementation
PreviewCredentialAttribute.fromJson(dynamic jsonObject) {
var previewAttribute = credentialToMap(jsonObject);
if (previewAttribute.containsKey('name')) {
name = previewAttribute['name'];
} else {
throw FormatException(
'name property needed in Attribute for Credential Preview');
}
if (previewAttribute.containsKey('value')) {
value = previewAttribute['value'];
} else {
throw FormatException(
'value property needed in Attribute for Credential Preview');
}
mimeType = previewAttribute['mime-type'];
}