idto_flutter 0.3.0 copy "idto_flutter: ^0.3.0" to clipboard
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: bottomSheet now presents the WebView in a rounded sheet that slides up over a dim backdrop (tap-to-close), sized by bottomSheet.minHeight (default 90%). fullScreen stays edge-to-edge. Those are the only two modes — the web SDK's responsive desktop modal is intentionally not mirrored on a phone (desktopModal remains on IDtoConfig for web-contract parity but drives no native UI). The DigiLocker popup mirrors the same presentation. IDtoLanding defaults 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 via getToken, opens the flow, and reports the outcome. Branding via brandColor/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 via share_plus, staged in the temp dir and deleted after. Filenames are sanitized (path-traversal-safe, length-bounded). Adds share_plus + path_provider dependencies.
  • displayMode forced to full_screen on the wire. The native host is always full-screen, so IDtoConfig.toWebConfig() forces the web SDK to full_screen and drops bottomSheet/desktopModal — no nested-drawer band. The fields remain on IDtoConfig for contract parity. Mirrors the RN bridge.toWebConfig.
  • workflowComplete is no longer terminal. It now fires a new onWorkflowComplete callback and keeps the WebView alive for the web SDK's success / download-report screen; IDto.open resolves with IDtoStatus.completed on the subsequent close (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) and bottomSheet (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 in IDtoConfig.
  • 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.open OAuth tabs are captured via onCreateWindow and hosted in a popup bound to the opener (so DigiLocker can post the result back), then dismissed on window.close(). The popup shows a centered loader while the (often slow) DigiLocker page loads.
    • Navigation allow-list now permits the whole idto.ai family (API, digilocker.idto.ai, redirect targets) + DigiLocker + CDN, extensible via IDtoConfig.allowedHosts.
    • Configurable IDtoConfig.readyTimeout (was a hard-coded 30s).
    • A 4xx/5xx on the main document before ready now fails init deterministically.
  • 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 a Future<IDtoResult>.
  • Runs the IDto web SDK CDN bundle (idto.js) inside flutter_inappwebview.
  • Typed IDtoConfig mirroring the web SDK config 1:1 with toJson().
  • Typed callback payloads: IDtoStepData, IDtoErrorData, IDtoAbandonData.
  • Camera/microphone permission grant + DigiLocker redirects inside the WebView.
  • Concurrent-open guard (StateError on double open).
  • Fatal errors that halt the flow (init errors and insufficient_credits) resolve the Future with IDtoStatus.error so the failure is observable.
0
likes
140
points
261
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

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.

Homepage

Topics

#kyc #identity #verification #webview

License

MIT (license)

Dependencies

flutter, flutter_inappwebview, path_provider, share_plus

More

Packages that depend on idto_flutter