For the complete documentation index, see llms.txt. This page is also available as Markdown.
flutter

Installation Guide

Install and configure Certta for Flutter. Learn SDK requirements, module selection, permissions, session setup, runtime token updates, and color theming.

Installing the SDK for Flutter

This guide walks you through the setup required to download, configure, and initialize Certta (caf_sdk 2.4.0+) in a Flutter app.

Check out the example app for a complete implementation example.

Requirements

Requirement
Version

Flutter

3.3.0+

Dart

3.9.0+

Android minSdk

26

Android compileSdk

36+

Kotlin

1.8+

Gradle

8.0+

Android Gradle Plugin (AGP)

8.0+

iOS deployment target

15.0+

Xcode

14.0+

Swift

5.0+

Step 1: Install the SDK

flutter pub add caf_sdk

The published package version is 2.4.0. Import the Certta DevX API with:

The sequential CafSdk / initializeCafSdk API remains available via package:caf_sdk/caf_sdk.dart. Prefer Certta for new integrations. See Migrating from CafSdk.

Step 2: Configure module selection

Create a caf-modules-config.json file in your project root (next to pubspec.yaml) to choose which native modules to bundle:

If you omit this file, all modules are enabled by default and iproov-lite is used as the Face Liveness provider.

Set to true the modules you want to use.

For a single provider, livenessProviders can be a string. Allowed values are iproov-lite, iproov-full, payface, and facetec. To use several providers, use an array:

iProov and Protobuf

  • iproov-lite: use when your app targets Protobuf JavaLite — the usual choice for a smaller Android binary.

  • iproov-full: use when you need Protobuf Java (full) together with iProov.

Fingerprint

The Fingerprint module is optional (fingerprint, boolean). It defaults to false. To enable it, set "fingerprint": true.

Fingerprint is collected as part of the liveness flow, so it is only bundled when faceLiveness or faceLivenessUI is also enabled. Setting "fingerprint": true without a liveness module has no effect.

Contact CAF Support to request activation on the backend. If it is not enabled on our side, the SDK will not trigger the fingerprint library even if the property is true locally.

Step 3: Android configuration

Configure the repositories block in your project's android/build.gradle.kts (usually at the root level):

Step 4: iOS configuration

Navigate to the ios/ directory of your Flutter project and run:

  • This step is mandatory so iOS can link the native modules.

  • Re-run pod install whenever native dependencies are added or updated.


Permissions

Android

Declare the following in AndroidManifest.xml:

Face Liveness

Permission
Description
Necessity

android.permission.CAMERA

Camera access for face verification (liveness).

Mandatory

android.permission.INTERNET

Communication with authentication and verification services (HTTPS/WSS).

Mandatory

Document Detector

Permission
Description
Necessity

android.permission.CAMERA

Camera access to capture document images.

Only for capture

android.permission.INTERNET

Upload captured images for processing and validation.

Mandatory

android.permission.READ_EXTERNAL_STORAGE

Access stored files when document upload is enabled.

Only for upload

Document Detector requires READ_EXTERNAL_STORAGE when document upload is enabled.

iOS

Declare the following in Info.plist:

Face Liveness

Permission
Description
Necessity

NSCameraUsageDescription

Camera access for face verification (liveness).

Mandatory

Network access

Communication with authentication and verification services (HTTPS/WSS).

Mandatory

Document Detector

Permission
Description
Necessity

NSCameraUsageDescription

Camera access to capture document images.

Only for capture

Network access

Upload captured images for processing and validation.

Mandatory

NSPhotoLibraryUsageDescription

Access stored files when document upload is enabled.

Only for upload


Configuring the session

To generate your mobile token, follow this guide:

Authentication

Initialize Certta once you have a valid mobile token (JWT) and user ID — typically after login:

You can confirm the session with await certta.isInitialized().

CerttaConfiguration parameters

Parameter
Type
Description

mobileToken

String

CAF mobile JWT from your backend.

userId

String

End-user identifier.

environment

CafEnvironment

Backend environment: prod, beta, or dev.

securityEnabled

bool

Enables security checks. Default true.

colorConfiguration

CafColorConfiguration?

Optional color theme. See Color theming.

configureSdk throws a PlatformException with code BRIDGE_EXCEPTION when the native mapper rejects the configuration.

Runtime configuration updates

userId and mobileToken can be updated after the initial configureSdk without repeating the full configuration. Call these after login, logout, or token refresh:

Logs

SDK pipeline logs are emitted on CerttaSdk.logStream:


Color theming

Face Liveness and Document Detector support custom colors so the SDK UI can match your brand. Pass hexadecimal strings (for example "#RRGGBB") on CafColorConfiguration when you call configureSdk.

All color fields are optional. Override only the colors you need.

Color property
Description

primaryColor

Main color for buttons and highlights.

secondaryColor

Secondary color for complementary elements.

backgroundColor

Screen background color.

contentColor

Color used for texts and icons.

mediumColor

Neutral color for elements like progress bars.

dialogBackgroundColor

Dialog and popup background color.

dialogBorderColor

Dialog and popup border color.


Language

Android

The language follows the device locale with no extra configuration.

iOS

Configure Localizations and CFBundleLocalizations in Xcode:

After these settings, the SDK uses the device language.


Code obfuscation

Add the following ProGuard/R8 rules to android/app/proguard-rules.pro so the SDK and its dependencies keep working after obfuscation.


Next steps

Face LivenessDocument Detector

Last updated