# Getting Started

The Incode Flutter SDK adds identity verification, onboarding, and authentication flows to your Flutter app. This section walks you through installing the SDK, initializing it, and configuring it for your use case.

## Start here

If you're new to the SDK, follow these steps in order:

1. **[Install the SDK](./flutter-installation)** in your Flutter project, including platform-specific setup for iOS and Android.
2. **[Choose an SDK mode](./flutter-sdk-modes)** based on whether your app captures and validates online, or captures only.
3. **[Choose an implementation pattern](./flutter-common-implementation-patterns)** based on where your onboarding flow is configured and how much control your app needs.

The remaining pages in this section cover specific setup options, advanced configurations, and maintenance tasks that you may or may not need depending on your integration.

## Your first flow

Once the SDK is installed and initialized, a minimal onboarding flow looks like this:

```dart
IncodeOnboardingSdk.init(
  apiKey: 'YOUR_API_KEY',
  apiUrl: 'YOUR_API_URL',
  testMode: false,
  onError: (String error) {
    print('Incode init failed: $error');
  },
  onSuccess: () {
    OnboardingSessionConfiguration sessionConfig = OnboardingSessionConfiguration();
    OnboardingFlowConfiguration flowConfig = OnboardingFlowConfiguration();
    flowConfig.addIdScan();
    flowConfig.addSelfieScan();
    flowConfig.addFaceMatch();

    IncodeOnboardingSdk.startOnboarding(
      sessionConfig: sessionConfig,
      flowConfig: flowConfig,
      onSuccess: () {
        print('Incode Onboarding completed!');
      },
      onError: (String error) {
        print('Incode onboarding error: $error');
      },
    );
  },
);
```

To react to individual modules as they complete, add the corresponding optional callback to your `startOnboarding` call:

```dart
IncodeOnboardingSdk.startOnboarding(
  sessionConfig: sessionConfig,
  flowConfig: flowConfig,
  onSuccess: () { /* ... */ },
  onError: (String error) { /* ... */ },
  onSelfieScanCompleted: (SelfieScanResult result) {
    print(result);
  },
);
```

For the full integration walkthrough including session configuration, error handling, and the available listener callbacks, see [Configure Flows Locally and Run End to End](./flutter-configure-flows-locally-and-run-end-to-end).

## Optional and advanced setup

These pages cover specific scenarios you may or may not require:

- [End-to-End Encryption (E2EE)](./flutter-e2ee): enable end-to-end encryption of capture artifacts.
- [Token-Based Setup](./flutter-token-based-setup): use the SDK without an API key by passing a backend-created token.
- [Delete Local Session Data](./flutter-delete-local-session-data): clean up locally stored onboarding data.

<br />
