SmileIDDocumentVerification constructor

SmileIDDocumentVerification({
  1. Key? key,
  2. required String countryCode,
  3. String? documentType,
  4. double? idAspectRatio,
  5. bool captureBothSides = true,
  6. String? bypassSelfieCaptureWithFile,
  7. String? userId,
  8. String? jobId,
  9. bool allowNewEnroll = false,
  10. bool showAttribution = true,
  11. bool allowGalleryUpload = false,
  12. bool allowAgentMode = false,
  13. bool showInstructions = true,
  14. bool skipApiSubmission = false,
  15. Map<String, String>? extraPartnerParams,
  16. required dynamic onSuccess(
    1. String resultJson
    ),
  17. required dynamic onError(
    1. String errorMessage
    ),
})

Implementation

factory SmileIDDocumentVerification({
  Key? key,
  required String countryCode,
  String? documentType,
  double? idAspectRatio,
  bool captureBothSides = true,
  String? bypassSelfieCaptureWithFile,
  // userId and jobId can't actually be null in the native SDK but we delegate their creation to
  // the native platform code, since that's where the random ID creation happens
  String? userId,
  String? jobId,
  bool allowNewEnroll = false,
  bool showAttribution = true,
  bool allowGalleryUpload = false,
  bool allowAgentMode = false,
  bool showInstructions = true,
  bool skipApiSubmission = false,
  Map<String, String>? extraPartnerParams,
  required Function(String resultJson) onSuccess,
  required Function(String errorMessage) onError,
}) {
  return SmileIDDocumentVerification._(
    onSuccess: onSuccess,
    onError: onError,
    creationParams: {
      "countryCode": countryCode,
      "documentType": documentType,
      "idAspectRatio": idAspectRatio,
      "captureBothSides": captureBothSides,
      "bypassSelfieCaptureWithFile": bypassSelfieCaptureWithFile,
      "userId": userId,
      "jobId": jobId,
      "allowNewEnroll": allowNewEnroll,
      "showAttribution": showAttribution,
      "allowAgentMode": allowAgentMode,
      "allowGalleryUpload": allowGalleryUpload,
      "showInstructions": showInstructions,
      "skipApiSubmission" : skipApiSubmission,
      "extraPartnerParams" : extraPartnerParams,
    },
  );
}