Skip to main content

chatasist_flutter 1.6.2 copy "chatasist_flutter: ^1.6.2" to clipboard
chatasist_flutter: ^1.6.2 copied to clipboard

Flutter plugin for embedding the Chatasist customer support chat widget with realtime messaging, media uploads, and voice/video call support.

1.6.2 #

  • Catch up after a connection drop. Realtime events sent while the socket was down are not replayed, so the plugin now reloads the chat list and the open conversation when the socket reconnects and when the app returns to the foreground. Replies and status changes (for example a chat being closed) that arrived in the meantime now show up without reopening the chat.
  • chatasistFlutter.setLanguage(...). Switch the widget language at runtime (az, en, ru, tr; regional forms such as az-AZ are accepted). The session is reloaded so the UI, dates, welcome texts, news, help topics and AI replies follow it; the realtime connection is kept.
  • Re-initializing no longer leaks a connection. Calling initialize() again now closes the previous instance first — its realtime socket, listeners and any open widget.
  • Read state follows the customer. The unread badge now uses the backend's per-chat customer_last_read_message_id, and opening a chat reports it with POST /api/widget/chats/{id}/read. Signing in or switching devices no longer shows old conversations as unread. Against an older backend without that field, the plugin falls back to device storage, now kept separately per customer.

1.6.1 #

  • Live chat status. The plugin now handles the .chat.updated realtime event on the customer channel and applies status, assignee_id, is_chat_with_ai, name and avatar to the open conversation and the chat list immediately. When an operator resolves a chat, or it is closed automatically after inactivity, the composer is replaced right away instead of staying active until the chat is reopened.
  • Resolved / closed banner. A finished chat now shows the web widget's footer instead of an empty space: "Conversation resolved" (or "Chat closed") with a short message and a Start new chat button. While the satisfaction survey is still pending, it shows the "rate this chat with the stars above" prompt instead. ChatasistWidgetPage wires the button to the new-conversation flow, including the pre-chat form for unidentified visitors.
  • System messages. WidgetMessage now parses event_meta (eventMeta, eventKind). Operator-only events (chat_status_changed, chat_assignee_changed, chat_customer_merged) are never shown to the customer, first_contact is shown in the customer's language, and other events fall back to their stored text. After sending, the thread is reloaded from GET chats/{id} so events in the send response (which carries no event_meta) cannot leak through.
  • Localized UI (az / en / ru / tr). All plugin text — tab names, composer placeholder, home, messages, help, news, pre-chat form, survey, calls, banners — and all dates now follow the session language. Month names and relative times are built in, so they do not depend on the device having locale data. The language is the backend's widget_locale from the session (resolved from ChatasistWidgetOptions.language), falling back to language, then English. Regional codes such as az-AZ are normalized to az before being sent, because the backend only matches exact codes.
  • Localized content. News and help topics are now requested with ?locale= set to the session language (previously they always came back in the backend's default, English), and new messages send language so AI replies and the survey invitation use it too.
  • Unread badge. The Messages badge now counts open conversations with an agent/AI message the customer has not seen. Read state is tracked per chat on the device (last seen message id, stored with the session), because the widget API has no customer read receipts. Resolved and closed chats are never counted, and opening a chat marks it read. On the first launch after upgrading, existing history counts as read, so the badge does not light up for old conversations.
  • New public fields: WidgetSession.widgetLocale / supportedLocales, WidgetChat.isFinished, WidgetMessage.eventMeta / eventKind / isHiddenFromCustomer.

1.6.0 #

  • Added customer token support so the AI agent can look up a signed-in customer's own data (orders, account, cart) without asking them to confirm by code. Pass the token your backend issued for the customer and the plugin sends it with every request as X-Customer-Token; Chatasist forwards it unchanged to your MCP server. Until now only the web widget could do this, so a customer who was signed in to the host app was still asked for a confirmation code.
  • New ChatasistWidgetOptions.customerTokenProvider: a callback the plugin calls whenever it needs a current token — on the first request, and again once the held token is older than customerTokenRefreshInterval (default 10 minutes). Recommended for short-lived tokens: no timer needed in the host app. A provider that throws keeps the previous token and is retried after 30 seconds; returning null (signed out) stops sending a token.
  • New ChatasistWidgetOptions.customerToken for a token you already hold at startup, and chatasistFlutter.setCustomerToken(...) to set, replace, or clear it at runtime without reloading the conversation.
  • The token is held in memory only. It is never written to device storage.
  • See the "Signed-in customers (customer token)" section in the README.

1.5.1 #

  • Fixed a double border on the message composer input: when the host app's theme defines an InputDecorationTheme (outlined borders and/or a fill colour), a second outlined, filled field was drawn inside the composer's own rounded border. The composer now clears every state border and the fill so it looks the same regardless of the host theme.

1.5.0 #

  • Added chatasistFlutter.onNewMessage, a Stream<WidgetMessage> that emits each new agent/AI reply received live over the realtime socket (the customer's own messages are excluded). Host apps can listen to show an in-app toast/banner for new replies while the app is in the foreground, then open the widget with present() on tap. Background delivery still requires native push in the host app.
  • Added chatasistFlutter.isPresenting so host apps can suppress the in-app toast while the widget is already on screen.
  • See the "Foreground new-message notifications" section in the README for a complete toast example.

1.4.2 #

  • Removed the decorative green chat-bubble icon from the conversation screen header; the header now shows just the back button and the title.

1.4.1 #

  • Fixed realtime delivery: the client subscribed to private-App.Models.Customer.{id} and private-chat.{id}, but the backend broadcasts on — and POST /api/widget/broadcasting/auth only authorizes — the tenant-scoped private-tenant.{companyId}.customer.{id} and private-tenant.{companyId}.chat.{id} channels. As a result every subscription was rejected and AI/agent replies never arrived over the socket; they only appeared on the next REST send. WidgetSession now parses company_id from POST /api/widget/session, and WidgetRealtimeClient subscribes to the tenant-scoped channel names (falling back to the legacy names only when the backend sends no company_id).

1.4.0 #

  • Migrated realtime from pusher_channels_flutter to dart_pusher_channels (pure-Dart Pusher protocol client) so the widget can connect to a self-hosted / managed Laravel Reverb WebSocket host — the native Pusher SDK only supported Pusher Cloud clusters.
  • POST /api/widget/session now returns an optional echo object (host, port, scheme) when the backend broadcasts over Reverb; WidgetSession exposes it as reverbHost / reverbScheme / reverbPort, and the client connects to that host (falling back to the Pusher Cloud cluster when absent).
  • Private channel authorization still flows through POST /api/widget/broadcasting/auth (unchanged), now via a custom authorization delegate.
  • Fixed the message composer input: the placeholder/text now vertically centers against the send button instead of top-aligning.

1.3.0 #

  • Hardcoded the widget backend to https://api.chatasist.com and removed the baseUrl field from ChatasistWidgetOptions (use the new ChatasistWidgetOptions.appUrl constant to read it).
  • Added a pre-chat identify form (WidgetPreChatScreen) that collects first name, last name, and an optional email before letting anonymous visitors start a new chat. Wired to the previously-unused POST /api/widget/identify endpoint and gated on the new customer_identified flag returned by POST /api/widget/session.
  • Added Open Graph–style link preview cards under chat bubbles via the previously-unused GET /api/widget/link-preview endpoint, with per-session caching on the controller and tap-to-open via url_launcher.
  • Exposed WidgetLinkPreview on the public package barrel.

1.2.0 #

  • Migrated widget voice/video calls from STUN-only P2P WebRTC to the Cloudflare Realtime SFU flow, matching the web and app-frontend clients.
  • Added cf_calls_client.dart implementing the Dart Realtime SFU client (session/publish/pull/renegotiate) over flutter_webrtc and http.
  • Updated WidgetCallEvent to carry caller_session_id, caller_track_ids, and recording_enabled instead of raw SDP offers.
  • startCall now returns CallStartInfo with cf_token/cf_worker_url; removed legacy answerCall/sendIceCandidate paths and the .call.ice event route.
  • acceptIncoming mints a cf-token, publishes to the SFU, and pulls the caller's tracks; onCalleeAnswered pulls the callee's tracks on .call.answered.

1.1.0 #

  • Added session-driven AI greeting and initial resource shortcut chips on the new conversation screen.
  • Added package SVG icon assets and replaced widget UI icon usage for closer parity with the web widget style.
  • Improved secure storage handling by scoping JWT/identity keys per baseUrl and channelId, with legacy key migration.
  • Improved composer and thread messaging UX with stronger attachment/audio flows and richer in-thread quick action rendering.
  • Improved chat/home/help/news/detail surfaces with updated layouts, spacing, and interaction polish.

1.0.13 #

  • Improved conversation UI on mobile by removing the extra top greeting header in new chats and centering the welcome content.
  • Added horizontal side insets for the card widget route so the chat sheet has spacing from screen edges.
  • Kept keyboard behavior smooth while composing by retaining dismiss-on-tap-outside and drag-to-dismiss in the thread.

1.0.12 #

  • Fixed conversation keyboard dismissal behavior so tapping outside input and dragging the message list now reliably closes the keyboard.

1.0.11 #

  • Added a fallback baseUrl default of https://app.chatasist.com when ChatasistWidgetOptions.baseUrl is not specified.

1.0.10 #

  • Added url_launcher for opening links from widget content in the host app environment.
  • Extended WidgetChat and WidgetMessage models with survey-related fields for in-chat surveys.
  • Improved WidgetRealtimeClient handling for incoming realtime messages.
  • Refined widget UI padding, spacing, and tab styling for consistency across home, messages, news, and help flows.

1.0.6 #

  • Added flutter_html for richer HTML rendering in widget surfaces.
  • Extended ChatasistFlutterPlugin with JWT handling improvements and additional presentation options via ChatasistWidgetOptions.
  • Added news and topics fetching in WidgetRepository for the news tab experience.
  • Improved the message composer UI, including attachment selection and handling.

1.0.2 #

  • Improved pub.dev package score by updating package metadata and API documentation.
  • Added an OSI-approved license declaration and recognized license file.

1.0.1 #

  • Improved usage guidance for integrating and launching the plugin.
  • Improved README documentation for setup clarity and onboarding flow.

1.0.0 #

  • Initial release of chatasist_flutter package.
  • Added plugin singleton API with initialize, setIdentity, present, dismiss, and refresh.
  • Added native Flutter chat widget UI with chat list, conversation thread, and message composer.
  • Added Widget Session bootstrap and JWT persistence for /api/widget/session.
  • Added chat APIs integration for listing chats, fetching chat details, and sending messages.
  • Added multipart attachment support for files, images, videos, and audios in widget messages.
  • Added realtime integration with Pusher private channels and widget broadcasting auth endpoint.
  • Added incoming call and call lifecycle handling with WebRTC signaling (start, answer, ice, end).
  • Added package example app demonstrating initialization and opening the widget.
  • Added initial unit and widget tests for core package behavior and session parsing.
1
likes
0
points
517
downloads

Publisher

verified publisherchatasist.com

Weekly Downloads

Flutter plugin for embedding the Chatasist customer support chat widget with realtime messaging, media uploads, and voice/video call support.

Homepage

License

unknown (license)

Dependencies

collection, dart_pusher_channels, file_picker, flutter, flutter_html, flutter_secure_storage, flutter_svg, flutter_webrtc, http, http_parser, image_picker, mime, url_launcher

More

Packages that depend on chatasist_flutter