VerifyAI Flutter SDK
Add photo verification to your Flutter app with a null-safe client, full-screen scanner flow, embedded camera widget, and offline retry support for queued base64 requests.
Quick Start
1. Install
flutter pub add verify_ai_flutter2. Use
import 'package:flutter/material.dart';
import 'package:verify_ai_flutter/verify_ai_flutter.dart';
final verifyAI = VerifyAI(apiKey: 'vai_live_...');
Future<void> handleVerify(BuildContext context) async {
final result = await verifyAI.presentScanner(
context,
policy: 'scooter_parking',
options: const ScannerOptions(
guidanceText: 'Center the scooter in the frame',
),
);
if (result == null) return;
if (result.isCompliant) {
print('Verified: ${result.verificationId}');
} else {
print('Issues: ${result.violationReasons}');
print('Feedback: ${result.feedback}');
}
}Features
One-Shot Scanner Flow
Use VerifyAI.presentScanner() to launch a full-screen verification flow with minimal setup.
Embedded Scanner Widget
Drop VerifyAIScanner into your own widget tree when you need custom routing, layout, or lifecycle control.
Multipart Uploads
Send raw camera bytes with verifyMultipart() to avoid base64 overhead when working with live captures.
Offline Queue
Queue transient failures locally with VerifyAIProvider and retry them automatically when connectivity returns for base64 verification flows.
Server-Driven Scanner Config
Load attempt limits and UI copy from fetchPolicyConfig() so scanner behavior can change without a new app release.
Null Safety
The SDK is fully null-safe with typed models for requests, results, queue items, and API errors.
Code Examples
Requirements
- Flutter 3.16 or higher
- Dart SDK 3.1+
- Android minSdkVersion 21+ for the camera plugin
- iOS: add NSCameraUsageDescription to Info.plist (e.g. 'Used to capture verification photos')
- Android: add <uses-permission android:name="android.permission.CAMERA" /> to AndroidManifest.xml
- VerifyAI API key
Frequently Asked Questions
Start Building with Flutter
Get your API key and add photo verification to your Flutter app with a real scanner flow and typed Dart client.