documentFormatFromJson function
Implementation
BarcodeFormattedResult documentFormatFromJson(Map<String, dynamic> json) {
var format = json['documentFormat'];
switch (format) {
case AAMVADocument.DOCUMENT_FORMAT:
return AAMVADocument.fromJson(json);
case BoardingPassDocument.DOCUMENT_FORMAT:
return BoardingPassDocument.fromJson(json);
case DEMedicalPlanDocument.DOCUMENT_FORMAT:
return DEMedicalPlanDocument.fromJson(json);
case MedicalCertificateDocument.DOCUMENT_FORMAT:
return MedicalCertificateDocument.fromJson(json);
case IDCardPDF417Document.DOCUMENT_FORMAT:
return IDCardPDF417Document.fromJson(json);
case SEPADocument.DOCUMENT_FORMAT:
return SEPADocument.fromJson(json);
case VCardDocument.DOCUMENT_FORMAT:
return VCardDocument.fromJson(json);
}
return UnknownBarcodeFormat('UNKNOWN');
}