Credential.fromJson constructor
Credential.fromJson(
- Map<String, dynamic> json
)
Implementation
factory Credential.fromJson(Map<String, dynamic> json) {
return Credential(
credentialId: json['credentialId'] as String,
isResidentCredential: json['isResidentCredential'] as bool? ?? false,
rpId: json.containsKey('rpId') ? json['rpId'] as String : null,
privateKey: json['privateKey'] as String,
userHandle:
json.containsKey('userHandle') ? json['userHandle'] as String : null,
signCount: json['signCount'] as int,
largeBlob:
json.containsKey('largeBlob') ? json['largeBlob'] as String : null,
backupEligibility: json.containsKey('backupEligibility')
? json['backupEligibility'] as bool
: null,
backupState:
json.containsKey('backupState') ? json['backupState'] as bool : null,
);
}