RevocationList2020Credential.fromJson constructor

RevocationList2020Credential.fromJson(
  1. dynamic jsonData
)

Implementation

RevocationList2020Credential.fromJson(super.jsonData)
    : super.fromJson() {
  subjectId = credentialSubject['id'];

  var type = credentialSubject['type'];
  if (type == null) {
    throw Exception('type property in credentialSubject is expected');
  }

  var encodedString = credentialSubject['encodedList'];
  if (encodedString == null) {
    throw Exception('encodedList is expected in credentialSubject');
  }
  revocationList = BitString.fromEncoded(encodedString);
}