widget_chat 0.0.21
widget_chat: ^0.0.21 copied to clipboard
Drop-in AI chatbot widget for Flutter, FlutterFlow & web — rich content, tools, multimodal, multi-language, dashboard-configured.
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_idtoGET /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.
ChatWidgetgainsonUserMessageSent(fires with the trimmed text on every user send — observation only) andinitialMessage(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_avataris now respected. The server'sshow_avatarwas 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 —
headerBuilderonChatWidget. Render a fully custom chat header, with access to the resolved name, avatar, online status, theme mode and every action callback (viaChatHeaderData). - 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.primaryis now pinned to the host-configured brand color instead of the MD3 tonal derivativeColorScheme.fromSeedproduces. 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_toggleconfig 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_darkconfig block (alongside the existingchat_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.BotConfigurationgainschatAppearanceDark,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 anAccess-Control-Allow-Originheader. - 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
colorunset (null), the chat inherits the host app's theme colour (ColorScheme.primary) instead of a forced hex.BotConfiguration.colorno 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).
RemoteConfignow reads the backend's snake_casefont_familykey 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 formatand 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
fullPagemode, read-only mode, and hostuserContext/authTokenforwarding- 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
mobileparameter to control web vs mobile layout behavior - Improved FAB padding for better positioning
- Added support for custom FAB button widget via
fabWidgetparameter - Fixed chat screen sizing on web platforms
- Enhanced responsive design for desktop browsers
0.0.2 #
- Fixed URL issue.
0.0.1 #
- Initial release
