IDCheckioResult.fromJson constructor

IDCheckioResult.fromJson(
  1. Map<String, dynamic> json
)

Implementation

IDCheckioResult.fromJson(Map<String, dynamic> json) {
  document = getDocument(json['document']);
  List<dynamic> jsonImages = json['images'];
  for (Map<String, dynamic> jsonImage in jsonImages) {
    images.add(ImageResult.fromJson(jsonImage));
  }
  Map<String, dynamic>? onlineContextResult = json['onlineContext'];
  if(onlineContextResult != null) {
    onlineContext = OnlineContext.fromJson(onlineContextResult);
  }
  List<dynamic> jsonInfos = json['sessionInfos'];
  for (Map<String, dynamic> info in jsonInfos) {
    sessionInfos.add(ErrorMsg.fromJson(info));
  }
  cisImageQualityStatus = enumFromString(ImageQualityStatus.values, json['cisImageQualityStatus']);
}