Skip to main content

widget_chat 0.0.26 copy "widget_chat: ^0.0.26" to clipboard
widget_chat: ^0.0.26 copied to clipboard

retracted

Drop-in AI chat widget for Flutter and FlutterFlow: answers from your content, rich messages, tools, live voice, 46 locales. No backend to build.

0.0.26 #

  • Docs: the README says where to get a project key, lists what the widget ships today (voice, rich messages, tools, languages) and installs with flutter pub add.

0.0.25 #

  • New: the chat follows the language the visitor writes in, and keeps one they chose. With "Auto-detect language" on in the dashboard, the backend now answers in the language of the visitor's message from the first reply and switches the chat UI with it (a change_language action with "reason": "detected"). Short or ambiguous messages ("ok", a file name, pasted code) change nothing. To let the visitor hold a language against that, every chat request carries a new locale_locked boolean next to locale. It turns true when the visitor picks a language in the header language picker, or when the bot switches because the visitor asked for it ("reason": "requested"). The lock is released when the conversation is cleared, when the user id changes, and when the host app changes currentLocale. It lives for the session only, like the chosen language itself.
  • RichAction.changeLanguage gains an optional reason. Payloads without it parse as before.
  • Fix: the voice call screen follows the light or dark theme, and a rich card the bot shows during a call gets the room it needs: the orb shrinks to a small presence row under the card, so the card's title, price and buttons are no longer clipped. The composer's voice button can restore a minimized call.
  • Fix: carousel cards share one image size. The image is a fixed square at the card width (capped), so a card with a longer description no longer gets a smaller picture than its neighbours.
  • Fix: filled action buttons stay readable on a light brand colour. The label is black or white depending on the accent's brightness.

0.0.24 #

  • New — VoiceCallView: the live call, without a chat around it. The voice call added in 0.0.23 could only be opened from the chat composer's mic button, and its transcript could only land in the chat thread. A host that wants a voice-first surface — a spoken interview, a guided intake, a hands-free assistant — now pushes VoiceCallView as its own screen and gets one VoiceCallOutcome back (both sides' captions in order, duration, the gateway's end_reason, and an error when the call never started). Per-call context reaches the model through BotConfiguration.userContext, which the SDK already sends in the call's init frame, so the persona stays in the dashboard while the specifics travel per call. VoiceCallController, VoiceCallState, VoiceCaption, VoiceCallOverlay and VoiceMicPermissionDenied are now exported for hosts that want to build their own surface on the same controller. The chat's own mic button is untouched — it still runs the same controller through ChatViewModel.
  • The call screen supplies the SDK's own ChatLocalizations delegates itself (as a Localizations scope, not a nested MaterialApp), so a host does not have to add them to its app and Navigator.of(context) still means the host's navigator. A call that fails to start renders nothing rather than a spinner that never resolves — the outcome carrying the error is what the host shows instead.
  • Host apps still must declare the platform mic permission (NSMicrophoneUsageDescription / RECORD_AUDIO); without it the call ends immediately with VoiceMicPermissionDenied in the outcome.

0.0.23 #

  • New — live voice chat (plan-gated, server-driven). When the backend's /api/project/config/ carries voice_configuration.enabled: true (Growth/Scale plans with the project's Voice toggle on), a mic button appears in the composer. Tapping it opens a full-panel voice call: a state-driven orb (listening / thinking / speaking), live captions for both sides, mute, a hang-up control, and a minimize mode that docks a "Voice chat live" bar so the visitor can keep texting mid-call. Audio streams as 16 kHz PCM to the widget-chat voice gateway (Gemini Live under the hood) and the bot replies with spoken audio + captions; on hang-up the server-persisted transcript turns (source='voice') are pulled into the thread. Fully backward compatible: on older backends or non-voice plans the config block is absent and nothing renders. Host apps must add the platform mic permission (NSMicrophoneUsageDescription / RECORD_AUDIO) to use voice; without it the SDK shows a graceful "microphone unavailable" notice. VoiceDebug.fakeMicUrl (debug-only) drives a call from a WAV fixture for automated tests.
  • Fix — brand-accent foregrounds now clear WCAG. Text/icons drawn on the brand accent (filled buttons, send icon, the disclosure "Got it" pill) picked hardcoded white, which fails on light accents (mint, amber). The readable ink is now chosen from the accent's luminance.
  • Fix — host chatAppearance overrides survive an empty dashboard palette. The server's chat_appearance block is merged per FIELD instead of per object, so a tenant who left colours unset no longer clobbers a host-supplied palette with an all-null object.

0.0.22 #

  • Improve — the SDK is now silent inside host apps by default. All internal debugPrint diagnostics (51 previously ungated call sites — debugPrint is only throttled in release builds, not stripped, so they leaked into host apps' production logcat/console) now route through an internal logger that only emits in debug builds AND when the host opts in via the new BotConfiguration.debugLogging flag. The Dio HTTP request/response dump is gated behind the same flag (previously it fired in every host debug/profile build) and no longer prints request headers, which carry the project secret key and the user's bearer token. Flip debugLogging: true while integrating to get the old traces back.
  • Fix — server-only welcome message no longer vanishes. When the host supplies no up-front welcomeMessage and relies on the server-fetched one (config + history hydrate concurrently), a race could skip the greeting entirely, leaving an empty chat screen — most visible right after sign-in (the chat remounts, then loads an empty history for the new user). History hydration now re-asserts the welcome at the top of the thread once the beginning is reached, so the greeting appears regardless of whether config or history wins the race. Regression test added.

0.0.21 #

  • New — paginated chat history. Long conversations no longer load in one shot. The chat now fetches only the newest page (25 messages) on open and pulls older pages on demand as the visitor scrolls up, showing a small spinner at the top while a page loads. Because the list is bottom-anchored, prepending older messages never jumps the scroll position. Fully backward compatible: the SDK sends an opt-in ?limit/?before_id to GET /api/chat/history/…, and a backend that ignores those params simply returns the full history (rendered as a single complete page). The synthetic welcome bubble is shown only once the very start of the thread is reached.

0.0.20 #

  • New — resume a request after sign-in. ChatWidget gains onUserMessageSent (fires with the trimmed text on every user send — observation only) and initialMessage (auto-sent exactly once after the conversation initializes). Together they let a host replay a guest's pre-login request into the remounted signed-in chat, so the answer streams in with the normal loading shimmer instead of being stranded in the guest thread. See "Resuming a request after sign-in" in the README.

0.0.19 #

  • Fix — dashboard show_avatar is now respected. The server's show_avatar was dropped on parse, so bot messages always showed the avatar even when a tenant turned it off in the dashboard. It's now parsed and honoured (AND-merged with the host value).
  • New — hideBarsOnScroll. Optional auto-hide of the chat header + message-input bars as the visitor scrolls up through history; they slide back on the way down. Configured from the dashboard (hide_bars_on_scroll) or the host.
  • New — headerBuilder on ChatWidget. Render a fully custom chat header, with access to the resolved name, avatar, online status, theme mode and every action callback (via ChatHeaderData).
  • Improve — adaptive carousel height. Carousel cards are sized to their real content + image aspect ratio (capped) instead of a fixed 480 px, so a minimal image+title card no longer over-crops into a full-screen portrait.

0.0.18 #

  • Brand-true accent in both themes: the chat ColorScheme.primary is now pinned to the host-configured brand color instead of the MD3 tonal derivative ColorScheme.fromSeed produces. In dark mode the seed used to land on a pale pastel of the brand (e.g. crimson -> washed pink), which filled primary rich-content action buttons and the send button with an off-brand, low-contrast color; filled accents now render the exact configured color with white ink.

0.0.17 #

  • Dark mode + theme switcher: the chat now supports Light / Dark / System theming. A "Theme" item in the header more-options menu lets visitors switch modes (gated by the new show_theme_toggle config flag); the choice persists per project. Dark mode fixes the previous white-header / black-on-black rendering inside dark host apps.
  • Per-mode colours: new chat_appearance_dark config block (alongside the existing chat_appearance, now the light set) lets tenants configure the surface/bubble/text palette separately for dark mode. default_theme_mode (light/dark/system) sets the initial mode. BotConfiguration gains chatAppearanceDark, showThemeToggle, defaultThemeMode.
  • Themed chrome: the overflow menu, confirmation dialogs (e.g. clear history), and snackbars now follow the active theme instead of hardcoded white/light surfaces.

0.0.16 #

  • Web: images now fall back to an HTML <img> element when a cross-origin byte-fetch is CORS-blocked, so attachments and rich-content images render on the web embed and dashboard preview even when the CDN lacks an Access-Control-Allow-Origin header.
  • pub.dev: added topics (chatbot, chat, ai, widget, flutterflow), a documentation link, a screenshots gallery, and README badges + a widget screenshot for better discovery and presentation.

0.0.15 #

  • Launcher: when "Use avatar as icon" is on, the avatar now renders at the configured Icon size, centred, with the launcher Background colour filling the button around it — matching the dashboard. Previously the avatar was rendered full-bleed at double size, covering the Background colour entirely (so a transparent/non-square avatar never revealed it). The configured Background colour is also passed through the avatar, so transparent PNGs reveal it instead of the bot's primary colour.

0.0.14 #

  • Primary colour can now be "Automatic": when the server/host leaves color unset (null), the chat inherits the host app's theme colour (ColorScheme.primary) instead of a forced hex. BotConfiguration.color no longer defaults to #3B82F6, and a null server colour preserves the host colour rather than clobbering it. Pass an explicit hex to override.

0.0.13 #

  • Fix: the server's configured font family was ignored (always rendered Roboto). RemoteConfig now reads the backend's snake_case font_family key instead of camelCase, so tenant font settings apply to the live widget and the dashboard live preview

0.0.12 #

  • Message bubbles: ChatGPT-style inline action row (copy / like / dislike) on bot replies, replacing the long-press menu that conflicted with text selection
  • Copy now yields human-readable text for rich-content cards (fallback text / component strings) instead of raw response JSON
  • Whole-message text selection via a single SelectionArea (drag across markdown blocks and card text) instead of block-by-block
  • Persist per-user like/dislike across reloads: the bubble restores the thumbs highlight from the history endpoint's my_rating
  • Dislike opens the existing "what went wrong" reason sheet directly from the action row

0.0.11 #

  • Raise dependency lower bounds to match the generated client (pub.dev lower-bound compatibility)
  • Apply dart format and lint auto-fixes across the package
  • Remove a stale repository URL from pubspec

0.0.10 #

  • Multimodal: visitors can attach photos (gallery/camera), auto-resized and sent inline or via a host-provided uploader
  • Rich content: markdown, cards, carousels, product lists, image galleries, button groups, and color-swatch pickers
  • Tools & actions: custom HTTP tools, host-page callbacks/deep-links, open-URL / send-message / request-input buttons
  • Multi-language: 46 translated UI locales, live in-chat language switching with optional auto-detect, per-locale content
  • Compliance & privacy: AI-disclosure notice (optional one-time acknowledgement), message reporting (Good/Bad response), data-reuse notice, user export/clear, pseudonymized user ids
  • Security: HMAC identity verification (signed user ids), allowed-origins/CORS
  • Theming: full chat palette (surface, bubbles, text), Google Fonts, customizable floating launcher
  • Sound: per-event effects with master toggle + volume
  • fullPage mode, read-only mode, and host userContext / authToken forwarding
  • Remove the example's internal compliance path dependency

0.0.9 #

  • Fix LayoutBuilder build-scope conflict with CustomOpenContainer route animation
  • Use hardcoded desktop dimensions to avoid layout crashes when embedded in LayoutBuilder parents

0.0.8 #

  • Package renamed from flutter_bot to widget_chat

0.0.7 #

  • Add rich content support (carousel, cards, images, product lists)
  • Add sound effects for chat events (message sent/received, notifications)
  • Add SoundConfiguration for customizable audio settings
  • Fix button visibility in rich content button groups

0.0.6 #

  • Fix 400 Bad Request on web: app_version and os_version were null
  • Add DeviceInfoService with proper defaults for all platforms
  • Add tests to prevent null API fields

0.0.5 #

  • Allow API_URL override via dart-define
  • Fix conversation history not loading when switching users
  • Fix configuration updates clearing chat messages
  • Add Firebase Crashlytics and Analytics integration
  • Improve debug logging for secret key tracing
  • Add tooltips for accessibility in ChatHeader widget

0.0.4 #

  • Languages support #75
  • Landmark on free AI chatbot #72
  • Text formatting: support all type #71
  • Online/offline status #65
  • Improve chat list scrolling
  • Refocus after message sent
  • API fetch different text translations

0.0.3 #

  • Added mobile parameter to control web vs mobile layout behavior
  • Improved FAB padding for better positioning
  • Added support for custom FAB button widget via fabWidget parameter
  • Fixed chat screen sizing on web platforms
  • Enhanced responsive design for desktop browsers

0.0.2 #

  • Fixed URL issue.

0.0.1 #

  • Initial release