idto_flutter library

IDto Flutter SDK.

Runs the IDto identity-verification web SDK CDN bundle inside an in-app WebView. Call IDto.open to start a verification flow.

Classes

IDto
Entry point for IDto identity verification.
IDtoAadhaarConfig
Aadhaar verification fallback configuration.
IDtoAbandonData
Payload for onAbandon.
IDtoBottomSheet
Mobile bottom-sheet sizing for displayMode: bottomSheet. minHeight / maxHeight accept a num (px) or a String percentage (e.g. '60%').
IDtoColors
Custom colors overriding the theme defaults. All fields optional.
IDtoConfig
Configuration for a single IDto verification session.
IDtoDesktopModal
Web-contract field only, kept for 1:1 parity with the web SDK config. The Flutter SDK presents either a bottom sheet or full screen on a phone (never a centered desktop modal), so this drives NO native UI here and is dropped from the wire payload by IDtoConfig.toWebConfig. width/height accept a num (px) or a String (e.g. '90vh').
IDtoErrorData
Payload for onError.
IDtoFaceMatchConfig
Face match module configuration.
IDtoLanding
Drop-in full-screen verification landing. Construct it as a route/home and the SDK owns the layout, token lifecycle, verification flow, and outcome.
IDtoLandingCopy
Landing-screen copy. Every field has a world-class default; pass only the ones you want to override (unspecified fields keep the default). Pass '' for heroSubtitle/heroNote/footer or const [] for steps/trust to hide that element.
IDtoLandingErrorDecision
A resolved error decision. message is set only for resetLanding.
IDtoNameMatchConfig
Host-app rules for the silent name_match module.
IDtoOpenGuard
Enforces the single-active-session rule (mirrors the web SDK's idempotent single-widget behavior). Exposed for testing.
IDtoPanConfig
PAN module configuration.
IDtoResult
The value the Future returned by IDto.open resolves to.
IDtoStepData
Payload for onStepComplete — fired after each individual step completes.
IDtoWorkflowCompleteData
Payload for the workflow-complete event (used to build a IDtoResult).

Enums

IDtoDisplayMode
Widget display mode.
IDtoEnv
IDto environment. Selects the CDN bundle and API base.
IDtoLandingErrorAction
What the landing should do in response to an in-flow onError.
IDtoLanguage
Widget UI language.
IDtoLivenessFailurePolicy
What to do when the liveness verdict is unavailable. An explicit not-live verdict always blocks regardless of this setting.
IDtoNameMatchDecisionMode
How comparable name-match pairs roll up into the overall passed verdict.
IDtoNameMatchPair
A name-match comparison pair.
IDtoStatus
Terminal outcome of an IDto.open call.
IDtoTheme
Widget color theme.

Constants

idtoBrand → const String
Default IDto brand color. Override per-merchant via brandColor / colors.
idtoDefaultCopy → const IDtoLandingCopy
The fully-resolved default copy (equivalent to const IDtoLandingCopy()).

Functions

contrastText(String bg) String
Relative luminance → pick black or white text for maximum contrast on bg. Mirrors the WCAG luminance calc in RN landingDefaults.contrastText.
mobileSkipPreVerified({Map<String, bool>? existing, required bool skipping, required String mobileModuleSlug}) Map<String, bool>?
The pre_verified map for a start: merges any consumer-supplied existing map with the mobile-skip entry when skipping. Returns existing unchanged when not skipping — so a remount with the skip off keeps the consumer's own preVerified (and yields null → the wire omits pre_verified).
paletteFromBrand(String brand, [IDtoColors? override]) IDtoColors
Build a complete palette from a single brand color; any explicit override fields win. Mirrors RN landingDefaults.paletteFromBrand.
resolveLandingError(IDtoErrorData d, {required bool skippingMobile, required String mobileModuleSlug, required List<String> mobileSkipRejectionCodes, required List<String> fatalSessionErrorCodes, required String resumeExpiredMessage, required String loadFailedMessage}) IDtoLandingErrorDecision
Map an IDtoErrorData to a landing recovery action.