KYC_VERIFICATION

A new Flutter package for verifying BVN/NIN.

IOS Requirements

update your ios/Runner/info.plist

<key>NSCameraUsageDescription</key>
<string>Allow Camera Permission</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Alllow photo library to store your captured image</string>

Android Requirements

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA"/> 
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

## Add this to make the app download mlkit while installing app on playstore
<application ...>
      ...
      <meta-data
          android:name="com.google.mlkit.vision.DEPENDENCIES"
          android:value="face" >
</application>

Using

import 'package:raven_verification/raven_verification.dart';
   
           RavenVerification.launch(
                                context,
                                config: KycConfig(
                                  metaData: {
                                    "reference": "2024xxxxxxx",
                                    "nin": "224xxxxx91",
                                  },
                                  forceWebLaunch: true,
                                  webVerificationUrl:
                                      "[URL HERE]",
                                  type: KycType.nin,
                                  onSuccess: (val) {},
                                  onErrorMessage: (error) {},
                                  atlasUrl: "",
                                  clientNumber: "988xxxxxx",
                                  baseColor: const Color(0xFF0B8376),
                                  publicKey:
                                      "xxxxxxxxxx",
                                  onVerificationFailure: (data) {},
                                  onClose: (_, __) {
                                    Navigator.pop(context);
                                  },
                                ),
                              );

Note

atlasUrl : atlasURL
clientBVN: client bvn is optional, the plugin also handles collection of BVN when it empty or not passed
baseColor: you can customimze the plugin to suite your app primaryColor
metaData: data sent back to your server
bearerToken: onboard on atlas to option your public key
onErrorMessage: callback for any error, all errors are sent via this callback and the plugin depends on the app toast to show errors via this callback
success: callback for on successful verification
failiure: callback when verificatio fails