toJson method
Allows you to serialize object.
Implementation
Map<String, dynamic> toJson() => {
"docType": _docType,
"namespaces": _namespaces.map((item) => item.toJson()),
"familyName": familyName?.value,
"givenName": givenName?.value,
"birthDate": birthDate?.value,
"issueDate": issueDate?.value,
"expiryDate": expiryDate?.value,
"issuingCountry": issuingCountry?.value,
"issuingAuthority": issuingAuthority?.value,
"documentNumber": documentNumber?.value,
"portrait": portrait?.value,
"drivingPrivileges": drivingPrivileges?.value,
"unDistinguishingSign": unDistinguishingSign?.value,
"administrativeNumber": administrativeNumber?.value,
"sex": sex?.value,
"height": height?.value,
"weight": weight?.value,
"eyeColour": eyeColour?.value,
"hairColour": hairColour?.value,
"birthPlace": birthPlace?.value,
"residentAddress": residentAddress?.value,
"portraitCaptureDate": portraitCaptureDate?.value,
"ageInYears": ageInYears?.value,
"ageBirthYear": ageBirthYear?.value,
"ageOver18": ageOver18?.value,
"issuingJurisdiction": issuingJurisdiction?.value,
"nationality": nationality?.value,
"residentCity": residentCity?.value,
"residentState": residentState?.value,
"residentPostalCode": residentPostalCode?.value,
"residentCountry": residentCountry?.value,
"biometricTemplateFace": biometricTemplateFace?.value,
"biometricTemplateIris": biometricTemplateIris?.value,
"biometricTemplateFinger": biometricTemplateFinger?.value,
"biometricTemplateSignatureSign": biometricTemplateSignatureSign?.value,
"familyNameNationalCharacter": familyNameNationalCharacter?.value,
"givenNameNationalCharacter": givenNameNationalCharacter?.value,
"signatureUsualMark": signatureUsualMark?.value,
}.clearNulls();