VerifiableCredential constructor
VerifiableCredential({
- required List context,
- required List<
String> type, - required dynamic issuer,
- required dynamic credentialSubject,
- String? id,
- required DateTime issuanceDate,
- CredentialStatus? status,
- CredentialStatus? credentialSchema,
- DateTime? expirationDate,
- LinkedDataProof? proof,
Implementation
VerifiableCredential(
{required this.context,
required this.type,
required this.issuer,
required this.credentialSubject,
this.id,
required this.issuanceDate,
this.status,
this.credentialSchema,
this.expirationDate,
this.proof}) {
if (context.first != credentialsV1Iri) {
throw FormatException(
'The context-Array must start with $credentialsV1Iri');
}
for (var iri in context) {
if (iri is String) {
if (!isUri(iri)) {
throw FormatException('$iri is no valid iri.');
}
}
}
}