toMap method

Map<String, dynamic> toMap()

Converts the HVDocConfig object to a map of key-value pairs.

Returns a map representing the HVDocConfig object.

Implementation

Map<String, dynamic> toMap() {
  return {
    HyperSnapSDKConstants.docCaptureUIStrings: hvDocCaptureUIStrings?.toMap(),
    HyperSnapSDKConstants.docShouldShowTrustLogos: shouldShowTrustLogos,
    HyperSnapSDKConstants.docShouldShowInstructionPage:
        shouldShowInstructionPage,
    HyperSnapSDKConstants.docShouldEnableUpload: shouldEnableDocumentUpload,
    HyperSnapSDKConstants.docShouldShowFlashIcon: shouldShowFlashIcon,
    HyperSnapSDKConstants.docTypeValue: docType?.documentTypeString,
    HyperSnapSDKConstants.docAspectRatioValue: aspectRatioValue,
    HyperSnapSDKConstants.docShouldSetPadding: shouldAddPadding,
    HyperSnapSDKConstants.docDefaultPaddingValue: padding,
    HyperSnapSDKConstants.docShouldShowCloseAlert: shouldShowCloseAlert,
    HyperSnapSDKConstants.docCloseAlertDialogTitle: closeAlertDialogTitle,
    HyperSnapSDKConstants.docCloseAlertDialogDescription:
        closeAlertDialogDescription,
    HyperSnapSDKConstants.docAutoCapture: shouldAutoCapture,
    HyperSnapSDKConstants.docAutoCaptureDuration: autoCaptureDuration,
    HyperSnapSDKConstants.docShouldReadBarcode: shouldReadBarcode,
    HyperSnapSDKConstants.docReadBarcodeTimeout: readBarcodeTimeout,
    HyperSnapSDKConstants.docDisableBarcodeSkip: disableBarcodeSkip,
    HyperSnapSDKConstants.ocrApiDetails: hvOCRAPIDetails?.toMap(),
    HyperSnapSDKConstants.docShouldShowReviewScreen: shouldShowReviewScreen,
    HyperSnapSDKConstants.docShouldEnableRetries: shouldEnableRetries,
  };
}