DocumentScannerParameters.fromJson constructor
DocumentScannerParameters.fromJson( - Map<String, dynamic> json
)
Implementation
factory DocumentScannerParameters.fromJson(Map<String, dynamic> json) =>
DocumentScannerParameters(
acceptedAngleScore: json.containsKey("acceptedAngleScore")
? (json["acceptedAngleScore"] as int)
: 75,
acceptedSizeScore: json.containsKey("acceptedSizeScore")
? (json["acceptedSizeScore"] as int)
: 80,
acceptedBrightnessThreshold:
json.containsKey("acceptedBrightnessThreshold")
? (json["acceptedBrightnessThreshold"] as int)
: 0,
acceptedAspectRatioScore: json.containsKey("acceptedAspectRatioScore")
? (json["acceptedAspectRatioScore"] as int)
: 85,
aspectRatios: json.containsKey("aspectRatios")
? (json["aspectRatios"] as List<dynamic>)
.map((it) => AspectRatio.fromJson(it as Map<String, dynamic>))
.toList()
: [],
ignoreOrientationMismatch: json.containsKey("ignoreOrientationMismatch")
? (json["ignoreOrientationMismatch"] as bool)
: false,
);