Skip to main content

Install & configure

Add to pubspec

dependencies:
ekyc_sdk: ^2.0.0

Then flutter pub get.

Platform setup

Android

The SDK uses the camera and runs ML Kit face detection on-device. Add to android/app/src/main/AndroidManifest.xml inside <manifest>:

<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" />

Minimum SDK 24 (android/app/build.gradle).

iOS

Add to ios/Runner/Info.plist:

<key>NSCameraUsageDescription</key>
<string>Required to capture identity photos and run liveness checks.</string>

Minimum deployment target iOS 13.

First call

import 'package:ekyc_sdk/ekyc_sdk.dart';

final sdk = EkycSdk(EkycConfig(
baseUrl: 'https://api.drukverify.com',
tokenProvider: () => fetchSessionFromYourBackend(),
));

The SDK is safe for app-wide use — construct one instance and share it. tokenProvider is called lazily on first authenticated request.

What you get

  • sdk.ocr.scan(...) — document OCR
  • sdk.face.{verify,register,search,dedupe}(...) — 1:1 + 1:N face
  • sdk.liveness.{challenge,check}(...) — anti-spoof
  • sdk.sessions.create(...) — exposed for completeness; mostly unused on mobile (your backend calls this)

UI widgets ship in a separate import:

import 'package:ekyc_sdk/widgets.dart';
// EkycLivenessWidget, EkycCameraCapture