dojah_kyc 0.1.0+1 copy "dojah_kyc: ^0.1.0+1" to clipboard
dojah_kyc: ^0.1.0+1 copied to clipboard

Unofficial Dojah KYC widget

Dojah Kyc #

[style: very good analysis][very_good_analysis_link] Powered by Mason License: MIT

Unofficail Dojah KYC widget

Installation 💻 #

❗ In order to start using Dojah Kyc you must add necessary permissions for Camera and/or Location in your AndroidManifext.xml file for Android and info.plist for iOS

To use the widget in your Flutter project, add the following dependency to your pubspec.yaml file:

dependencies:
  dojah_kyc: 0.1.0+1 # Replace with the latest version

Then run:

flutter pub get

Usage #

Import the package in your Dart file:

import 'package:dojah_kyc/dojah_kyc.dart';

Example #

    await DojahKyc(
      config: const DojahConfig(
      publicKey: "your key",
      appId: 'your app id',
      type: 'custom',
      config: {
      'widget_id': optional widget id,
        // "pages": [
        //   {
        //     "page": "user-data",
        //     "config": {"enabled": false}
        //   },
        //   {
        //     "page": "government-data",
        //     "config": {"bvn": true, "selfie": true}
        //   },
        // ]
    }),
    showLogs: true,
    onClosed: () {
        print('closed');
        Navigator.pop(context);},
    onSuccess: (v) {
      print(v.toString());
      Navigator.pop(context);
    },
    onError: (){},
    ).show(context);

Parameters #

  • config (required): An instance of DojahConfig containing the necessary information for the verification process. Refer to https://api-docs.dojah.io/docs/flutter-sdk for detailed reference.

  • showLogs (optional): A boolean flag indicating whether to show logs during the verification process. Default is false.

  • onClosed (optional): A callback function that gets triggered when the widget is closed.

  • onSuccess (optional): A callback function that gets triggered when the verification is successful. It receives a dynamic parameter representing the success response.

  • onError (optional): A callback function that gets triggered when an error occurs during the verification process. It receives an error message as a parameter.

1
likes
0
points
26
downloads

Publisher

unverified uploader

Weekly Downloads

Unofficial Dojah KYC widget

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

connectivity_plus, flutter, flutter_inappwebview

More

Packages that depend on dojah_kyc