IdExtractionResult constructor

IdExtractionResult(
  1. Map dataMap
)

Implementation

IdExtractionResult(Map<dynamic, dynamic> dataMap) : super(dataMap) {
  Map<dynamic, dynamic>? frontDataMap =
      dataMap.getValue<Map<dynamic, dynamic>>(Inbound.frontIdData);
  Map<dynamic, dynamic>? backDataMap =
      dataMap.getValue<Map<dynamic, dynamic>>(Inbound.backIdData);
  frontIdData = frontDataMap != null ? FrontIdData(frontDataMap) : null;
  backIdData = backDataMap != null ? BackIdData(backDataMap) : null;
  frontLiveness = dataMap.getValue<double>(Inbound.frontLiveness);
  backLiveness = dataMap.getValue<double>(Inbound.backLiveness);
  warning = dataMap.getValue<String>(Inbound.warning);
  List<dynamic>? tempWarningCode =
      dataMap.getValue<List<dynamic>>(Inbound.warningCode);
  if (tempWarningCode != null) {
    warningCode = tempWarningCode.map((item) => item as String).toList();
  } else {
    warningCode = null;
  }
}