Flutter SDK
A powerful and seamless Flutter SDK for integrating Prembly's Identity KYC verification into your iOS, Android, and Web applications.
Features
- Cross-platform: Works natively on iOS, Android and Flutter Web.
- Secure: Direct integration with Prembly's secure verification infrasrtucture.
- Easy to Use: Launch the KYC flow with just a few lines of code.yaml:
Getting Started
Add the package to your pubspec.yaml:
dependencies:
prembly_identity_kyc: ^0.0.1
Platform Configuration
Since the Identity KYC flow requires the user to take a selfie and scan ID documents, you must add camera permissions to your application.
iOS
Add the following keys to your
ios/Runner/Info.plist file:
NSCameraUsageDescription
This app requires access to the camera to verify your identity.
NSMicrophoneUsageDescription
This app requires access to the microphone for liveness checks.
Android
Add the following permissions to your android/app/src/main/AndroidManifest.xml just above the tag:
Note: Ensure your minSdkVersion in android/app/build.gradle is at least 19.
Web
No extra configuration is required. The browser will automatically request camera permissions from the user when the flow starts.
Usage
Import the package and call PremblyIdentityKyc.verify passing the necessary options.
import 'package:prembly_identity_kyc/prembly_identity_kyc.dart';
void startVerification(BuildContext context) {
PremblyIdentityKyc.verify(
context: context,
options: IdentityKycOptions(
widgetKey: 'your_widget_key_here',
widgetId: 'your_widget_id_here',
firstName: 'John',
lastName: 'Doe',
email: '[email protected]',
phone: '+2348012345678',
isTest: true,
metadata: {
'transaction_id': 'txn_123',
},
callback: (response) {
print('Verification Result: $response');
},
),
);
}
