idto_flutter 0.3.0
idto_flutter: ^0.3.0 copied to clipboard
Flutter wrapper for the IDto identity verification web SDK. Runs the IDto CDN bundle inside an in-app WebView and bridges config in and verification callbacks out.
0.3.0 #
Brings the Flutter SDK to full feature parity with the React Native SDK.
- Native bottom-sheet presentation.
displayMode: bottomSheetnow presents the WebView in a rounded sheet that slides up over a dim backdrop (tap-to-close), sized bybottomSheet.minHeight(default 90%).fullScreenstays edge-to-edge. Those are the only two modes — the web SDK's responsive desktop modal is intentionally not mirrored on a phone (desktopModalremains onIDtoConfigfor web-contract parity but drives no native UI). The DigiLocker popup mirrors the same presentation.IDtoLandingdefaults to a 90%-height bottom sheet. IDtoLanding— a batteries-included, drop-in verification landing screen (hero, numbered steps, CTA, trust row, footer) that mints the token viagetToken, opens the flow, and reports the outcome. Branding viabrandColor/colors/logo/copy; the palette is derived (WCAG-contrast CTA text) the same way as the RN SDK. New exports:IDtoLanding,IDtoLandingCopy,idtoDefaultCopy,idtoBrand,contrastText,paletteFromBrand.- Native report sharing — the result PDF is captured from the WebView
(a
blob:/data:<a download>interceptor injected before the bundle) and handed to the OS share/save sheet viashare_plus, staged in the temp dir and deleted after. Filenames are sanitized (path-traversal-safe, length-bounded). Addsshare_plus+path_providerdependencies. displayModeforced tofull_screenon the wire. The native host is always full-screen, soIDtoConfig.toWebConfig()forces the web SDK tofull_screenand dropsbottomSheet/desktopModal— no nested-drawer band. The fields remain onIDtoConfigfor contract parity. Mirrors the RNbridge.toWebConfig.workflowCompleteis no longer terminal. It now fires a newonWorkflowCompletecallback and keeps the WebView alive for the web SDK's success / download-report screen;IDto.openresolves withIDtoStatus.completedon the subsequentclose(or hardware-back). This is what makes the report download reachable on the happy path.
0.2.0 #
- Config parity with web SDK
global.d.ts:faceMatchConfig.livenessFailurePolicy(IDtoLivenessFailurePolicy.failOpen | failClosed | needsReview).desktopModal(IDtoDesktopModal) andbottomSheet(IDtoBottomSheet) display sizing.
test/parity_test.dart: a guard that fails when the web SDK config contract gains a field or enum value not mirrored inIDtoConfig.- WebView hardening:
- The WebView document now runs under the IDto API origin so the bundle's
API calls are same-origin — no CORS dependency (was
idto.local, which the backend CORS allow-list rejected). - DigiLocker multi-window:
window.openOAuth tabs are captured viaonCreateWindowand hosted in a popup bound to the opener (so DigiLocker can post the result back), then dismissed onwindow.close(). The popup shows a centered loader while the (often slow) DigiLocker page loads. - Navigation allow-list now permits the whole
idto.aifamily (API,digilocker.idto.ai, redirect targets) + DigiLocker + CDN, extensible viaIDtoConfig.allowedHosts. - Configurable
IDtoConfig.readyTimeout(was a hard-coded 30s). - A 4xx/5xx on the main document before
readynow fails init deterministically.
- The WebView document now runs under the IDto API origin so the bundle's
API calls are same-origin — no CORS dependency (was
- Example rewritten into a one-tap runnable app (in-app token fetch against the dev sandbox + on-screen event log).
- Expanded README into a full integration guide.
0.1.0 #
- Initial release.
IDto.open(context, config:)returns aFuture<IDtoResult>.- Runs the IDto web SDK CDN bundle (
idto.js) insideflutter_inappwebview. - Typed
IDtoConfigmirroring the web SDK config 1:1 withtoJson(). - Typed callback payloads:
IDtoStepData,IDtoErrorData,IDtoAbandonData. - Camera/microphone permission grant + DigiLocker redirects inside the WebView.
- Concurrent-open guard (
StateErroron double open). - Fatal errors that halt the flow (
initerrors andinsufficient_credits) resolve the Future withIDtoStatus.errorso the failure is observable.