toJson method
Implementation
Map<String, dynamic> toJson() {
return {
"detectorType": detectorType.name,
if (ignoreOrientationMismatch != null)
"ignoreOrientationMismatch": ignoreOrientationMismatch,
if (detectDocumentAfterSnap != null)
"detectDocumentAfterSnap": detectDocumentAfterSnap,
"autoSnapEnabled": autoSnapEnabled,
if (acceptedAngleScore != null) "acceptedAngleScore": acceptedAngleScore,
if (acceptedSizeScore != null) "acceptedSizeScore": acceptedSizeScore,
if (requiredAspectRatios != null)
"requiredAspectRatios":
requiredAspectRatios!.map((e) => e.toJson()).toList(),
if (autoSnapSensitivity != null)
"autoSnapSensitivity": autoSnapSensitivity,
if (partiallyVisibleDocumentConfiguration != null)
"partiallyVisibleDocumentConfiguration":
partiallyVisibleDocumentConfiguration!.toJson(),
};
}