A unique access token should be created upon each SDK entry. In order to generate an access token, please refer to Valify's Authentication Documentation.
Importing
Import the module’s function in your file using the following line
The plugin builder is separated into two components.
Required Configurations
Initialize the required parameters as follows while adding the required configurations
finalString baseURL =' '; //put your acctual base url herefinalString bundleKey =' '; //put your actual bundle key herefinalString accessToken =' '; //put your actual access token here
Optional Configurations
Initialize the required parameters as follows while adding the desired configurations
finalString language ="<insert_language>"; // "en" is set as defaultfinalbool document_verification =<boolean>; // false is set as defaultfinalbool collect_user_info =<boolean>; // false is set as defaultfinalbool document_verification_plus =<boolean>; // false is set as defaultfinalbool advanced_confidence =<boolean>; // false is set as defaultfinalbool profession_analysis =<boolean>; // false is set as defaultfinalbool review_data =<boolean>; // default is truefinalbool preview_captured_image =<boolean>; //default is falsefinalbool manual_capture_mode =<boolean>; //default is falsefinalbool capture_only_mode =<boolean>; // default is falsefinalString primary_color = ”<hex_color_code>”; //default is valify default colorfinalbool enable_logging=<boolean>; // default false
Configurations Breakdown
This section shows the breakdown of all optional builder configurations.
The following line is where the user interface language is set.
finalString language ="<insert_language>"; // ["ar" or "en"]
The currently supported languages are Arabic and English
If the following line is set to true, the SDK will return document verification plus data
finalbool document_verification_plus =<boolean>;
If the following line is set to true, the SDK will return advanced confidence data
finalbool advanced_confidence =<boolean>;
If the following line is set to true, the captured image will be displayed for the user.
finalbool preview_captured_image =<boolean>;
If the following line is set to true, the SDK will automatically enable manual capture if it detects that the user is unable to autocapture card.
finalbool manual_capture_mode =<boolean>;
If the following line is set to true, a screen is added to the user flow that displays the images captured and the OCR result to the user.
finalbool review_data =<boolean>;
If the following line is set to true, the SDK purely performs image capturing and only returns these images in the SDK response.
finalbool capture_only_mode =<boolean>;
The following line is optional and can be used to receive event logs from the SDK experience to be used for user behavior analysis.
finalbool enable_logging=<boolean>;
The following line is optional and can be used to set your company's branding color to the SDK's user interface.
finalString primaryColor = ”<hex_color_code>”;
Parameter Declaration
Declare the SDK parameters with the configuration variables previously created
try {finalString? result =awaitVidvocrFlutterPlugin.startOCR(params);//handle logic to use the liveness response depending on the state } onPlatformExceptioncatch (e) {//catch errors here }