PreviewCredential.fromJson constructor

PreviewCredential.fromJson(
  1. dynamic jsonObject
)

Implementation

PreviewCredential.fromJson(super.jsonObject) : super.fromJson() {
  if (type ==
          'https://didcomm.org/issue-credential/3.0/credential-credential' ||
      type == DidcommMessages.previewCredential) {
    if (body.containsKey('attributes')) {
      List tmp = body['attributes'];
      attributes = [];
      for (var a in tmp) {
        attributes.add(PreviewCredentialAttribute.fromJson(a));
      }
    }
  }
}