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.
Add the SDK to your pubspec.yaml:
Then fetch dependencies:
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.
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.
EnvironmentConfigConnects the SDK to your Vlens tenant:
ColorsConfigCustomise the SDK UI to match your brand — supports separate light and dark themes:
SdkConfig — all parametersRuns the complete flow: ID front → ID back → liveness.
onSuccess — ExtractDataWhen verification succeeds, onSuccess is called with an ExtractData object (if getExtractedData: true):
onFailureCalled with (errorCode, errorMessage) when verification fails or the user cancels:
Override specific error messages to match your app’s tone or language:
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.
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.