Skip to content
veriffy
RUEN

Flutter

The verification in an Android and iOS app, on top of webview_flutter.

Requirements

Flutter 3.24 or later (Dart 3.5), Android 7.0 (API 24) or later, iOS 14.3 or later.

Install

Take the flutter folder from the SDK archive and add it as a path dependency:

YAML
dependencies:
  veriffy_flutter:
    path: ../veriffy-sdk/flutter

Camera access

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

The permission_handler version

permission_handler 13.x needs compileSdk 37. If your app is on a lower version, pin permission_handler: ^12.0.0 in your pubspec.yaml.

Usage

Dart
import 'package:veriffy_flutter/veriffy_flutter.dart';

Future<void> verify(BuildContext context) async {
  final url = await myBackend.createVerificationSession();   // your server: POST /v1/sessions
  if (!context.mounted) return;

  final result = await Veriffy.start(
    context,
    url,
    onEvent: (event) {
      if (event is VeriffyStepEvent) analytics.log('kyc_step', event.step);
    },
  );

  switch (result) {
    case VeriffyCompleted(:final status):
      showPending(status);
    case VeriffyCancelled():
      showRetry();
    case VeriffyFailed(:final error):
      showError(error.code);
  }
}

Veriffy.start opens the verification full screen and returns the result when it closes.

Start typing: a section name, a parameter or an error code

↑↓ selectEnter openEsc close