isOfSameType method

bool isOfSameType(
  1. VerifiableCredential other
)

Implementation

bool isOfSameType(VerifiableCredential other) {
  if (credentialSchema != null && other.credentialSchema != null) {
    return credentialSchema!.type == other.credentialSchema!.type &&
        credentialSchema!.id == other.credentialSchema!.id;
  } else {
    for (String typeValue in type) {
      if (!other.type.contains(typeValue)) return false;
    }
    return true;
  }
}