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.
Overview
seon_orchestration_flutter is built as a Flutter plugin using MethodChannel to bridge Dart to the native SEON Orchestration SDKs on iOS and Android.Architecture Layers
Dart Layer
The Dart layer provides the public API, types, and MethodChannel communication. Key files:lib/src/seon_orchestration.dart— Public API with static methods wrapping MethodChannel callslib/src/types.dart— Dart classes and enums (SeonConfig, SeonVerificationResult, SeonVerificationStatus, SeonErrorCode, SeonException)lib/seon_orchestration_flutter.dart— Barrel export file
seon_orchestration:
@visibleForTesting so tests can swap in a mock channel without needing a platform interface package.
iOS Implementation
The iOS implementation uses Swift with a plugin registrar pattern. Key files:ios/Classes/SeonOrchestrationPlugin.swift— Plugin registrar, receives MethodChannel callsios/Classes/SeonOrchestrationImpl.swift— Swift singleton with actual SDK integration
SeonOrchestrationPluginregisters as a MethodChannel handler- Incoming method calls are dispatched to
SeonOrchestrationImpl SeonOrchestrationImplmanages SDK initialization and verification flow- Results are returned via the FlutterResult callback
SeonOrchestrationImpl handles:
- SDK initialization with configuration
- Managing the
UINavigationControllerfor the verification flow - Implementing
SEONOrchSDKServiceDelegateto receive callbacks - Bridging delegate callbacks to the stored FlutterResult
Android Implementation
The Android implementation is written in Kotlin and uses a proxy Activity pattern. Key files:android/.../SeonOrchestrationPlugin.kt— FlutterPlugin + ActivityAware implementationandroid/.../SeonVerificationActivity.kt— Transparent proxy Activity
startVerificationis called from Dart via MethodChannel- Plugin stores the MethodChannel result and launches the proxy Activity
- Proxy Activity registers an
ActivityResultLauncherand starts SEON verification - When complete, the Activity resolves the stored result and finishes itself
- The SEON SDK requires an Activity to launch its flow
ActivityResultLaunchermust be registered before the Activity reaches STARTED lifecycle state- The proxy Activity provides a clean lifecycle boundary
- It uses a transparent theme (
Theme.Translucent.NoTitleBar) so users don’t see it
Data Flow
Initialization Flow
Verification Flow
Error Handling
Errors are propagated through PlatformException:- Native code catches exceptions
- Returns error via FlutterResult with error code and message
- Dart receives PlatformException
- Plugin wraps it as
SeonExceptionwith a typedSeonErrorCodeenum and the raw platform string
SeonErrorCode.fromString() method maps raw platform strings to enum values, with unknown as a fallback.
Thread Safety
- iOS: All SDK calls are explicitly dispatched to the main thread
- Android: Activity lifecycle ensures operations run on the UI thread
- MethodChannel: Flutter handles thread marshalling automatically
Performance Considerations
- Lazy initialization: SDK is not initialized until
initialize()is called - Single instance: Only one verification can run at a time
- Transparent UI: Android proxy Activity uses transparent theme to avoid UI flicker
- Efficient bridging: MethodChannel uses binary message passing with minimal overhead