Flutter SDK
The Vlens Flutter SDK (vlens) embeds the full identity verification experience — national ID scanning, liveness detection, and face matching — directly into your mobile app with a single method call.
Installation
Add the SDK to your pubspec.yaml:
Then fetch dependencies:
Android setup
For Android 13+, add the following attribute to the <application> tag in android/app/src/main/AndroidManifest.xml:
Omitting this attribute on Android 13+ causes back navigation to behave incorrectly inside the SDK screens.
Quick start
Import the package and call VLensManager().init() with a configured SdkConfig:
That one call launches the full verification UI. The SDK handles camera permissions, ID scanning, liveness detection, and result delivery through your callbacks.
Configuration
EnvironmentConfig
Connects the SDK to your Vlens tenant:
ColorsConfig
Customise the SDK UI to match your brand — supports separate light and dark themes:
SdkConfig — all parameters
Verification modes
Full verification (default)
Liveness only
ID scan only
Runs the complete flow: ID front → ID back → liveness.
Handling results
onSuccess — ExtractData
When verification succeeds, onSuccess is called with an ExtractData object (if getExtractedData: true):
onFailure
Called with (errorCode, errorMessage) when verification fails or the user cancels:
Custom error messages
Override specific error messages to match your app’s tone or language:
Relation to the REST API
The SDK wraps the same REST endpoints documented in the Digital Identity guide:
The transactionId in SdkConfig maps to transaction_id in the REST API — pass the same value to link SDK results with server-side records.
Latest version
v0.1.9 — UI improvements: primary color applied to ID frames and scanning GIFs, sticky buttons on ID review screen, improved status indicator messages during camera capture, enhanced localisation.
See all versions on pub.dev/packages/vlens/versions.

