DePassport constructor
DePassport(
- GenericDocument document
Implementation
DePassport(GenericDocument document) : super(document) {
/// Document ID number (in the top-right corner)
id =
document.fieldByTypeName("ID")!.let((field) => TextFieldWrapper(field));
/// Surname
surname = document
.fieldByTypeName("Surname")!
.let((field) => TextFieldWrapper(field));
/// Maiden name
maidenName = document
.fieldByTypeName("MaidenName")
?.let((field) => TextFieldWrapper(field));
/// Given names
givenNames = document
.fieldByTypeName("GivenNames")!
.let((field) => TextFieldWrapper(field));
/// Birth date
birthDate = document
.fieldByTypeName("BirthDate")!
.let((field) => ValidatedTextFieldWrapper(field));
/// Nationality
nationality = document
.fieldByTypeName("Nationality")!
.let((field) => TextFieldWrapper(field));
/// Birthplace
birthplace = document
.fieldByTypeName("Birthplace")!
.let((field) => TextFieldWrapper(field));
/// Expiry date
expiryDate = document
.fieldByTypeName("ExpiryDate")!
.let((field) => ValidatedTextFieldWrapper(field));
/// Passport type
passportType = document
.fieldByTypeName("PassportType")!
.let((field) => TextFieldWrapper(field));
/// Country code
countryCode = document
.fieldByTypeName("CountryCode")!
.let((field) => TextFieldWrapper(field));
/// Gender
gender = document
.fieldByTypeName("Gender")!
.let((field) => TextFieldWrapper(field));
/// Signature image
signature = document
.fieldByTypeName("Signature")!
.let((field) => TextFieldWrapper(field));
/// Photo image
photo = document
.fieldByTypeName("Photo")!
.let((field) => TextFieldWrapper(field));
/// Issue date
issueDate = document
.fieldByTypeName("IssueDate")!
.let((field) => ValidatedTextFieldWrapper(field));
/// Issuing authority
issuingAuthority = document
.fieldByTypeName("IssuingAuthority")!
.let((field) => TextFieldWrapper(field));
/// Raw MRZ text value
rawMRZ = document
.fieldByTypeName("RawMRZ")!
.let((field) => TextFieldWrapper(field));
mrz = document.childByDocumentType("MRZ")!.let((document) => MRZ(document));
}