usesmileid_platform_interface library

Classes

AnalyzerErrorCode
Error codes for analyzer registration and lifecycle errors.
AnalyzerFactory
Dart-side tag naming a native analyzer backend, face or document.
Attestation
Partner-facing entry point for device-integrity attestation. Wraps the Pigeon AttestationApi channel that delegates to:
BoundingBox
A face or document detection bounding box in normalised (0–1) space.
CaptureReadyEvent
File-emission event from the native capture transitioner.
DeviceIntegritySignals
Native device-integrity signals, returned by Attestation.deviceIntegritySignals.
DocumentAnalyzer
Dart-side document analyzer that delegates entirely to the native iOS/Android implementation via a Pigeon platform channel.
DocumentAnalyzerFactory
Dart-side factory tag for a native document analyzer.
DocumentConfig
Configuration for a document scan session.
DocumentDetectorConfig
Fine-grained tuning for the document detector.
DocumentDetectorOutput
Output produced by the native document analyzer for a single frame.
DocumentGuide
What the on-screen guide frames, for the camera's close-focus floor: the document's width in millimetres and the share of the upright camera frame's width the guide covers. The native DocumentGuideTracker keeps it; the camera zooms only as far as the document filling the guide needs.
DocumentScanResult
The result returned by the native document analyzer for a single frame.
EnhancedSmartSelfieConfig
Configuration for the Enhanced Smart Selfie liveness flow.
FaceAnalyzer
Dart-side face analyzer that delegates entirely to the bundled native ML library via a Pigeon platform channel.
FaceAnalyzerFactory
Dart-side factory tag for a native face analyzer.
FaceCaptureDefaults
The selfie capture's frame count, which this SDK asks the native session for and then checks the captured set against at upload. It matches the Android and iOS SDKs' ThresholdConfig.FaceCapture default; the native session sets the scan timing itself.
FaceConfig
Configuration for a face scan session.
FaceDetectorConfig
Fine-grained tuning for the face detector.
FaceDetectorOutput
Output produced by the native face analyzer for a single frame.
FaceScanResult
The result returned by the native face analyzer for a single frame.
FaceTracking
One face as a tracker reads it: kamera's tracked face on iOS (ARKit on a TrueDepth iPhone), the detector's largest face on Android. A reading its source doesn't measure is null.
HardwareAttestation
Per-session device hardware-attestation capability, returned by Attestation.generateHardwareAttestation.
HeadPose
Head orientation angles produced by the native face analyzer. Sign conventions match the native modules — see iOS AGENTS.md guardrails.
NativeNetworkClient
The native network client, driven with wire values over the platform channel: the configuration and each job cross as JSON, files by path.
NativeNetworkHooks
The partner's hooks the native network client calls. Each is optional: only those set cross the platform channel.
RuntimeIntegrityProvider
Provides the sealed runtime report the native bridge computes for the runtime_integrity submission-metadata field.
SentryDsnProvider
Provides the Sentry DSN bundled in the native ArkanaKeys (Global.sENTRY_DSN) to the Dart crash-reporting layer.
UploadImageCheck
The server's image checks on a selfie job's files, run by the native bridge's UploadImageCheck, the check the Android and iOS capture screens run, so a set the server would reject as an image issue is retaken on the device.
UseSmileIDCrashReporting
Manages Sentry crash reporting for the UseSmileID SDK.
UseSmileIDMLErrorCode
Typed error codes for ML exceptions.
UseSmileIDMobileServices
Which analyzers the build carries, which services the phone runs, and so which to use.
UseSmileIDScanState
Dart mirror of the native UseSmileIDScanState value type.
UseSmileIDTestRoute
Where a testing package sends the SDK's requests instead of Smile ID: its in-process server on this device. usesmileid_testing's server router implements it; usesmileid hides it from partners.
ViewportCropRegion
The on-screen document guide rectangle, expressed as fractions of the preview viewport plus the viewport's pixel size and the feed's scale mode.

Enums

AnalyzerFactoryKey
Type-safe identifiers for the native face- and document-analyzer factories that the cross-platform DSL can route between at runtime.
CaptureReadyEventKind
Semantic role of a captured frame the native transitioner persisted.
CaptureType
Identifies the type of capture a flow or analyzer targets.
DocumentKind
The kind of document a capture frames, for the camera's close-focus floor. Its wireToken is the native bridge's DocumentKind token, so the native DocumentGuideTracker knows the document's size.
DocumentSide
Which side of a two-sided document a capture session is producing.
FaceDetectorMode
Preset sensitivity profiles for face detection.
HeadTurnDirection
Direction of a required head turn during Enhanced Smart Selfie capture. Used inside UseSmileIDScanState.currentDirection when the native transitioner is on the ESS head-turn step, and consumed by the ESS animation overlay to point its arrow at the right side.
ImageType
Wire-stable identifiers for the capture-image type carried in the Smile EXIF tag's image_type_id field. Numeric values are part of the wire contract the server reads — never renumber; only append new variants. The Pigeon bridge ships the integer (id), not the Dart enum case, so each value must remain stable across releases.
MLIssueSeverity
Severity levels for ML exceptions.
UseSmileIDCaptureStep
What the selfie asks the user for while the face qualifies. Used in UseSmileIDScanState.captureStep while the native session runs the selfie.
UseSmileIDMobileServicesProvider
The mobile-services vendor whose on-device ML can run on the phone, as the Android SDK's UseSmileIDMobileServicesProvider names it.
UseSmileIDScanStateType
ViewportContentScale
How the camera feed is scaled into the preview viewport. Mirrors the native ViewportContentScale: crop covers the viewport (longest side fills, the other axis is centre-cropped); fit letterboxes.

Functions

sourceSdkIdentifier() → String
SDK identity for the smileid-source-sdk header and the EXIF sdk field — the server rejects a mismatch between the two.

Exceptions / Errors

AnalyzerAlreadySubscribedException
An analyzer with the same identity was registered for a CaptureType that already has one. Carries the offending analyzerName so partner code can correlate it with their analyzer registration site.
AnalyzerNotFoundException
No analyzer for the requested CaptureType: none registered under ml { analyzers { } }, or the build left it out. The message names the type.
AttestationException
Typed exceptions surfaced by Attestation when the native integrity manager reports a documented failure mode. Partners can match on the concrete type for tailored handling, or catch the base AttestationException to handle any failure uniformly.
AttestationNotInitializedException
Attestation.requestToken was called before a successful warm-up, or after the cached state was invalidated. Call Attestation.warmUp and retry.
AttestationNotSupportedException
Apple's App Attest / Google's Play Integrity flat-out refused the device. Typically: simulator, jailbroken/rooted device, or an install that did not come through the official store. The integrity path cannot proceed for this session.
AttestationTokenRequestFailedException
Per-request token generation failed (App Attest generateAssertion, Play Integrity per-request request). May transiently fail under network blips; the wire format flags this as retryable for the next request.
AttestationWarmupFailedException
The integrity-token provider failed to warm up (Play Integrity prepareIntegrityToken rejected, App Attest attestKey failed). Generally non-retryable within the same session.
EmptyAnalyzersRegistryException
The analyzers { } block was opened but no forCaptureType entries were added inside it.
MissingAnalyzersBlockException
The ml() block was provided but the analyzers { } block inside it was never opened.
MissingCaptureTypeException
An analyzer was registered without a CaptureType binding.
NativeNetworkException
A failure from the native network client: one of the shared error codes, the HTTP status when the server answered, whether it is retryable, and whether it refused a file part with no file to send (fileMissing).
UseSmileIDMLException
Base class for all ML-layer exceptions thrown by the UseSmileID SDK.