DocumentScannerOutputSettings.fromJson constructor

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

Implementation

factory DocumentScannerOutputSettings.fromJson(Map<String, dynamic> json) =>
    DocumentScannerOutputSettings(
      pagesScanLimit: json.containsKey("pagesScanLimit")
          ? (json["pagesScanLimit"] as int)
          : 0,
      documentImageSizeLimit: json.containsKey("documentImageSizeLimit")
          ? (json["documentImageSizeLimit"] as int)
          : 0,
      documentAnalysisMode: json.containsKey("documentAnalysisMode")
          ? DocumentAnalysisMode.values
              .byName(json["documentAnalysisMode"] as String)
          : DocumentAnalysisMode.UNFILTERED_DOCUMENT,
      defaultFilter: json.containsKey("defaultFilter")
          ? (json["defaultFilter"] != null
              ? ParametricFilter.fromJson(
                  json["defaultFilter"] as Map<String, dynamic>)
              : null)
          : null,
    );