fromValue static method
Returns the EncryptedData
that corresponds to the value
or null
if
the value
is not valid.
Implementation
static CommercioEncryptedData fromValue(String value) {
switch (value) {
case 'content':
return CommercioEncryptedData.CONTENT;
case 'content_uri':
return CommercioEncryptedData.CONTENT_URI;
case 'metadata.content_uri':
return CommercioEncryptedData.METADATA_CONTENT_URI;
case 'metadata.schema.uri':
return CommercioEncryptedData.METADATA_SCHEMA_URI;
default:
throw ArgumentError(
'Invalid argument $value. Valid values are "content", "content_uri", "metadata.content_uri" and "metadata.schema.uri"');
}
}