SmileIDDocumentVerification constructor
SmileIDDocumentVerification({
- Key? key,
- required String countryCode,
- String? documentType,
- double? idAspectRatio,
- bool captureBothSides = true,
- String? bypassSelfieCaptureWithFile,
- 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 dynamic onSuccess(
- String resultJson
- required dynamic onError(
- 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,
},
);
}