SDK reference · Flutter SDK / Flutter Getting Started

SDK Modes

The SDK supports three modes that control whether captured images are uploaded and validated server-side.

Available modes

  • SdkMode.standard: The default. Captured images are uploaded to Incode's servers and validated. Use this mode for standard onboarding flows.
  • SdkMode.captureOnly: Skips image upload and server validation for ID and Selfie scans. Use this mode when you want to capture images on the device without server-side processing.
  • SdkMode.submitOnly: Submit previously captured data without performing new captures.

Set the SDK mode

Pass sdkMode to the init method or call setSdkMode after initialization. If you do neither, the SDK uses SdkMode.standard.

// Pass sdkMode to init:
IncodeOnboardingSdk.init(
  apiKey: 'YOUR_API_KEY',
  apiUrl: 'YOUR_API_URL',
  sdkMode: SdkMode.captureOnly,
  onError: (String error) {},
  onSuccess: () {},
);

// Or change mode after init:
IncodeOnboardingSdk.setSdkMode(sdkMode: SdkMode.captureOnly);

When to call setSdkMode

Call setSdkMode after init and before startOnboarding (or setupOnboardingSession). Do not call setSdkMode mid-session; doing so is not an error, but it can cause undefined behavior.

The SDK preserves the set mode for the next session.

Was this page helpful?