toJson method
Implementation
Map<String, dynamic> toJson() {
return {
'credentialId': credentialId,
'isResidentCredential': isResidentCredential,
'privateKey': privateKey,
if (rpId != null) 'rpId': rpId,
if (userHandle != null) 'userHandle': userHandle,
if (signCount != null) 'signCount': signCount,
if (largeBlob != null) 'largeBlob': largeBlob,
if (backupEligibility != null) 'backupEligibility': backupEligibility,
if (backupState != null) 'backupState': backupState,
if (userName != null) 'userName': userName,
if (userDisplayName != null) 'userDisplayName': userDisplayName,
if (cmtgKeys != null) 'cmtgKeys': [...?cmtgKeys],
if (activeCmtgKeyIndex != null) 'activeCmtgKeyIndex': activeCmtgKeyIndex,
if (generateCmtgKeyOnNextOperation != null)
'generateCmtgKeyOnNextOperation': generateCmtgKeyOnNextOperation,
};
}