getTypeDetailsMatch method

OcrMrzDocumentDetailType? getTypeDetailsMatch([
  1. ConstData? data
])

Implementation

OcrMrzDocumentDetailType? getTypeDetailsMatch([ConstData? data]) {
  String? dc = docCode;
  OcrMrzDocumentDetailType? match;
  if (docCode == null) {
    return null;
  }
  if (dc != null && dc.length > 1) {
    match =  data!.documentDetailType.lastOrNullWhere(
          (a) => a.type == docCode?.characters.first && (a.subType == "*" || a.subType == docCode?.characters.last) && (a.country == "*" || a.country == documentIssueCountry?.code3),
    );
  }
  return match;
}