In modern mobile app development, verifying user identities safely and efficiently is crucial for fintech, travel, e-commerce, and security-centric applications. The flutter_idv Flutter package bridges your Flutter codebase with Regula's powerful Identity Verification (IDV) SDK, enabling real-time document scanning, biometric facial matching, and identity validation on both iOS and Android.

When Should You Use the flutter_idv Package?

The flutter_idv package is designed for applications requiring robust biometric checks and official document validation. Common use cases include:

  • Fintech Onboarding: Verifying government-issued IDs and matching faces for Know Your Customer (KYC) compliance.
  • Travel and Booking: Validating passports or driver's licenses before booking confirmations.
  • Fraud Prevention: Preventing duplicate accounts or fake registrations via automated identity checks.
  • Secure Access Portals: Authenticating high-security user actions.

Note: flutter_idv wraps Regula's native IDV SDK. It relies on Regula services for backend processing and SDK functionality, so it is strictly intended for mobile platforms (Android & iOS) and does not support Flutter Web.

Installation

To add the flutter_idv package to your Flutter project, run the standard pub command in your terminal:

Code
flutter pub add flutter_idv

Native Platform Setup Notes

Because flutter_idv communicates with native Android and iOS libraries, you must configure platform-specific permissions and credentials prior to invoking the SDK:

iOS Setup

Open your iOS Info.plist file and include descriptions for camera access, which Regula requires for scanning documents and performing facial matching:

Code
<key>NSCameraUsageDescription</key>
<string>This app requires camera access to scan documents and complete identity verification.</string>

Android Setup

Ensure your Android manifest includes camera permissions. Additionally, check that your project's minSdkVersion meets the minimum requirements specified by Regula's SDK. Always verify exact native requirement details on pub.dev or official Regula documentation.

Basic Implementation Example

The code below demonstrates how to initialize the plugin and trigger the IDV flow inside a standard Flutter application.

Dart / Flutter
import 'package:flutter/material.dart';
import 'package:flutter_idv/flutter_idv.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  
  // Initialize the flutter_idv plugin
  await FlutterIdv.initialize();
  
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('IDV Verification Demo'),
        ),
        body: Center(
          child: ElevatedButton(
            onPressed: () async {
              // Trigger the Regula IDV verification flow
              final result = await FlutterIdv.startVerification(context);
              
              if (result.isSuccess) {
                // Verification succeeded: handle valid identity details
                ScaffoldMessenger.of(context).showSnackBar(
                  const SnackBar(content: Text('Verification Successful! me')),
                );
              } else {
                // Verification failed or was cancelled by the user
                ScaffoldMessenger.of(context).showSnackBar(
                  const SnackBar(content: Text('Verification Failed or Cancelled.')),
                );
              }
            },
            child: const Text('Start Verification'),
          ),
        ),
      ),
    );
  }
}

Common Mistakes to Avoid

  • Missing Camera Permissions: Forgetting to add camera keys in Info.plist or AndroidManifest.xml will cause crashes during native lifecycle initiation.
  • Targeting Web or Desktop: Attempting to run flutter_idv on Web, Windows, macOS, or Linux will fail because native Regula wrappers exist only for Android and iOS.
  • Uninitialized Plugin Call: Calling verification functions without invoking WidgetsFlutterBinding.ensureInitialized() and initializing the plugin beforehand.

Pros and Cons

Pros

  • Provides a unified Dart API across Android and iOS.
  • Leverages native performance for heavy camera and biometric processing.
  • Simplifies complex native camera lifecycle management and background threading.

Cons

  • Dependent on native Regula SDK setup and service licensing.
  • No support for Flutter Web or Desktop platforms.

Alternatives

If flutter_idv does not fit your specific requirements, consider these alternatives:

  • flutter_document_scanner: Suitable for lightweight document scanning without full biometric identity validation.
  • ml_kit_face_detection: Suitable if you only need on-device facial detection without Regula identity validation.
  • Custom Native Integration: Writing custom Platform Channels to integrate an alternate identity provider directly.

Frequently Asked Questions

Does the flutter_idv Flutter package support Web or Desktop?

No. The flutter_idv package wraps native Android and iOS libraries for Regula IDV, so it is strictly limited to mobile platforms and does not support Web, Windows, macOS, or Linux.

What primary engine powers the flutter_idv package?

The package wraps Regula's native Identity Verification (IDV) SDK, enabling cross-platform Dart code to capture document images and perform biometric facial matching.

Where can I verify native dependency requirements for flutter_idv?

Always verify exact native setup instructions, required SDK versions, and licensing steps on the official pub.dev package page at https://pub.dev/packages/flutter_idv.