CredentialSubjectMetadata.fromJson constructor

CredentialSubjectMetadata.fromJson(
  1. dynamic data
)

Implementation

CredentialSubjectMetadata.fromJson(dynamic data) {
  var jsonObject = credentialToMap(data);
  mandatory = jsonObject['mandatory'] ?? false;
  valueType = jsonObject['value_type'];

  if (jsonObject.containsKey('display')) {
    List tmp = jsonObject['display'];
    display = [];
    for (var e in tmp) {
      display!.add(OidcDisplayObject.fromJson(e));
    }
  }
}