0 purchases
dojah kyc
Dojah Kyc #
[][very_good_analysis_link]
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
copied to clipboard
Then run:
flutter pub get
copied to clipboard
Usage #
Import the package in your Dart file:
import 'package:dojah_kyc/dojah_kyc.dart';
copied to clipboard
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);
copied to clipboard
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.
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.