termii_resolve_livechat 0.2.1
termii_resolve_livechat: ^0.2.1 copied to clipboard
Termii Resolve Live Chat SDK for Flutter. Add Resolve in-app customer support to any Flutter app in a few lines, with user identification and unread-count events.
0.2.1 #
Added #
ResolveSessionHost— mount once above the navigator to keep warm sessions' JavaScript running while the chat is closed. iOS suspends a WebView removed from the view hierarchy, which could stall unread events until the next open; the host parks the WebView invisibly so it never leaves the hierarchy. Recommended for any app showing an unread badge or notifying fromResolveLiveChat.preload(onUnreadCountChanged: ...).
0.2.0 #
Requires a current Resolve widget build. This release relies on the chat page
padding itself for the notch and home indicator, so pointing baseUrl at an
older or self-hosted build leaves its header under the status bar on Android.
Breaking #
- Public API renamed from
Termii*toResolve*(TermiiLiveChat→ResolveLiveChat,TermiiUser→ResolveUser, and so on). The old names remain as@Deprecatedaliases naming their replacement, and will be removed in 1.0.0. The package name and the JavaScript bridge are unchanged. - Removed
onUnreadCountChangedfromResolveLiveChat.open— it never fired when it mattered, because unread only accrues once the chat screen is gone. UseResolveLiveChat.preload(onUnreadCountChanged: ...)instead.ResolveChatWidget.onUnreadCountChangedis unchanged.
Changed #
- The chat WebView is now cached and reused across opens (
keepAlive, defaulttrue), so reopening is instant and keeps the conversation. It is bound to the identity it was created for, so a different user gets a fresh session. CallResolveLiveChat.logout()on sign-out to clear it and free its memory. PasskeepAlive: falsefor the previous load-every-time behaviour. ResolveLiveChat.opennow fills the screen edge to edge. PassuseSafeArea: truefor the previous inset layout.- The loading placeholder is now
ResolveChatSkeletoninstead of a spinner, and stays up until the chat reports ready — removing the blank screen that showed in between. Override withloadingBuilder.
Added #
ResolveLiveChat.preload()— load the chat in the background so the first open is instant.ResolveLiveChat.logout()/release()— clear the cached chat session.ResolveChatSession— the cached WebView behind a widget ID, withaddListenerfor observing events while no chat screen is mounted.- Cached sessions now reload automatically when reacquired stale — older than
maxSessionAge(default 2 hours) or after the app was backgrounded longer thanmaxBackgroundDuration(default 30 minutes) — so a warm session picks up widget deploys and dashboard config changes (branding, welcome text) instead of serving its original page load forever. Both are tunable onopen,preloadandResolveChatWidget; passnullto disable either.
Fixed #
ResolveChatController.reload()now clears the session's ready state, so the next screen shows its placeholder while the page reloads.- Reloading a session no longer drops the signed-in user: the identity is re-applied when the fresh page comes up, instead of it reverting to an anonymous visitor.
0.1.0 #
Initial release.
TermiiLiveChat.open()full-screen chat routeTermiiChatWidgetfor custom layouts, withready/chat-closed/unread-count-changed/errorbridge eventsTermiiUseridentificationTermiiChatController— post-load user updates, visibility mirroring, reload- Automatic app-lifecycle → chat-visibility mirroring for unread tracking
- Android file-attachment hook (
onAttachFile), external-link hook (onExternalUrl)