dojah_kyc 0.2.0 copy "dojah_kyc: ^0.2.0" to clipboard
dojah_kyc: ^0.2.0 copied to clipboard

Unofficial Dojah KYC widget

Dojah Kyc Dojah-logo #

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

Unofficial 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: "test_pk_xxxxxxxxxxxx",
            appId: 'xxxxxxxxxxxxxxxxxx',
            type: 'custom',
            configData: {
            'widget_id': 'xxxxxxxxxxxxxx',
            "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: (v) {
            print(v.toString());
            Navigator.pop(context);
            },
            ).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
140
points
26
downloads

Publisher

unverified uploader

Weekly Downloads

Unofficial Dojah KYC widget

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

connectivity_plus, flutter, flutter_inappwebview, permission_handler

More

Packages that depend on dojah_kyc