Skip to main content

Documentation Index

Fetch the complete documentation index at: https://jdev-e8db0569.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Starts the SEON verification flow. The SDK must be initialized with initialize() before calling this method.

Signature

// On SeonOrchestration
static Future<SeonVerificationResult> startVerification()

Parameters

None.

Returns

Future<SeonVerificationResult> — Resolves with the verification result. See SeonVerificationResult for the result structure and SeonVerificationStatus for all possible status values.

Errors

Throws SeonException on failure.
Error CodeRaw StringDescription
SeonErrorCode.eNotInitializedE_NOT_INITIALIZEDinitialize() has not been called yet
SeonErrorCode.eNoActivityE_NO_ACTIVITY(Android only) No activity is available to launch verification
SeonErrorCode.eVerificationFailedE_VERIFICATION_FAILEDThe verification process failed unexpectedly
SeonErrorCode.eVerificationInProgressE_VERIFICATION_IN_PROGRESSA verification is already in progress

Example

import 'package:seon_orchestration_flutter/seon_orchestration_flutter.dart';

try {
  final result = await SeonOrchestration.startVerification();

  switch (result.status) {
    case SeonVerificationStatus.completedSuccess:
      print('Verification passed!');
      break;
    case SeonVerificationStatus.completedPending:
      print('Verification pending review');
      break;
    case SeonVerificationStatus.completedFailed:
      print('Verification failed');
      break;
    case SeonVerificationStatus.interruptedByUser:
      print('User cancelled');
      break;
    case SeonVerificationStatus.missingLocationPermission:
      print('Location permission required');
      break;
    case SeonVerificationStatus.error:
      print('Error: ${result.errorMessage}');
      break;
    default:
      break;
  }
} on SeonException catch (e) {
  print('Verification failed: $e');
}

Handling Permission Denial

On Android, if the user denies location permission, the SDK returns missingLocationPermission instead of throwing an error:
import 'package:url_launcher/url_launcher.dart';

final result = await SeonOrchestration.startVerification();

if (result.status == SeonVerificationStatus.missingLocationPermission) {
  showDialog(
    context: context,
    builder: (ctx) => AlertDialog(
      title: const Text('Permission Required'),
      content: const Text('Please enable location services in Settings'),
      actions: [
        TextButton(onPressed: () => Navigator.pop(ctx), child: const Text('Cancel')),
        TextButton(
          onPressed: () => openAppSettings(),
          child: const Text('Open Settings'),
        ),
      ],
    ),
  );
}

Platform Behavior

  • Presents the verification UI using a UINavigationController
  • If the root view controller is already a UINavigationController, it is used directly
  • Otherwise, a new navigation controller is created and presented modally
  • Delegate callbacks are bridged to the stored MethodChannel result
Only one verification can run at a time. Calling startVerification() while a verification is in progress will throw a SeonException with code SeonErrorCode.eVerificationInProgress.