OcrConfig.fromJson constructor

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

Implementation

factory OcrConfig.fromJson(Map<String, dynamic> json) => OcrConfig(
    charCountX: json["charCountX"],
    charCountY: json["charCountY"],
    charPaddingXFactor: json["charPaddingXFactor"]?.toDouble(),
    charPaddingYFactor: json["charPaddingYFactor"]?.toDouble(),
    charWhitelist: json["charWhitelist"],
    customCmdFile: json["customCmdFile"],
    maxCharHeight: json["maxCharHeight"],
    minCharHeight: json["minCharHeight"],
    minConfidence: json["minConfidence"],
    minSharpness: json["minSharpness"],
    models: json["models"] == null ? [] : List<String>.from(json["models"]!.map((x) => x)),
    scanMode: ocrConfigScanModeValues.map[json["scanMode"]],
    validationRegex: json["validationRegex"],
);