returningai_widget 0.1.0 copy "returningai_widget: ^0.1.0" to clipboard
returningai_widget: ^0.1.0 copied to clipboard

Official Flutter SDK for embedding ReturningAI widgets on Android and iOS.

Changelog #

0.1.0 #

  • Distinguishes custom-data JSON types and structure in session fingerprints while ignoring object key order (EC-04).

  • Preserves Unicode keys and values in bridge replies by decoding Base64 bytes as UTF-8 before parsing JSON (EC-03).

  • Normalizes host provider/callback exceptions and omits raw authentication causes from public errors (EC-02).

  • Uses fixed authentication failure text and omits server hints to prevent opaque credential reflection (EC-01).

  • Hosts custom product embeds only. Removes first-class descriptor factories (store, channel, social, milestone, currencyView, referralConditions). Use ReturningAIWidgetDescriptor.custom or ReturningAIWidgetConfiguration.customBundle.

  • Reloads the generated widget shell instead of the content-origin / after loadHtmlString.

  • Adds package hot-path performance budget tests for HTML rendering, bridge encode/decode, navigation policy, and coordinator start. Budgets are CI-safe and do not measure device WebView time-to-interactive.

  • Defaults the web runtime to the unpkg IIFE at https://unpkg.com/@returningai/widget-sdk/dist/rai-widget.iife.js. Hosts may pass runtimeUrl on the primary constructor or on customBundle to pin a version.

  • Emits HTML language from Dart locale (same value; no second public field).

  • Types rai-session-expired as ReturningAIWidgetSessionExpired and clears the cached access token.

  • Ignores stale bridge envelopes after WebView reuse instead of emitting bridgeProtocolFailed.

  • Rejects off-allowlist subframe navigations without emitting navigationRejected to the host. Main-frame rejects still error; off-allowlist main-frame HTTPS is still delegated.

  • Default-allowlists milestoneCtaClick alongside callbackFieldOptions and storePurchaseSuccess.

  • Loads the local shell with the widget content origin so split-bundle import(app.js) is same-origin. Prefetches serverless auth while the shell loads.

  • Treats rai-mounted or rai-ready as session-ready. Reuses the WebView across configuration changes.

  • Fills a transparent display background from the resolved theme. Keeps the WebView mounted on auth/rai-error; ready timeout overlays instead of unmounting.

  • Uses UUID v4 serverless nonces. Omits empty loading-text. No default Flutter loading overlay.

  • Gallery example: custom Store, Socials, Currency (earning-overview), and Milestones public embeds.

  • Initial unreleased Flutter SDK for embedding ReturningAI widgets on Android and iOS.

  • Adds typed configuration, secure Dart authentication, WebView bridge handling, events, callbacks, navigation policy, lifecycle control, and example documentation.

  • Enforces token-provider cancellation and timeout, canonical Origin headers, exact bridge shapes, safe error redaction, fresh-session retry, external-link delegation, platform-aware system themes, and subresource-safe WebView errors.

  • Adds Android and iOS example runners plus a loopback device integration test.

0
likes
120
points
125
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Official Flutter SDK for embedding ReturningAI widgets on Android and iOS.

Repository (GitHub)
View/report issues

Topics

#returningai #widget #webview

License

unknown (license)

Dependencies

flutter, http, webview_flutter, webview_flutter_android, webview_flutter_wkwebview

More

Packages that depend on returningai_widget