Skip to content

Releases: flyerhq/flutter_chat_ui

v2.3.1

26 May 21:58
Compare
Choose a tag to compare

⚠️ Breaking Changes ⚠️

Even though this is a patch release, it depends on flutter_chat_core, which introduced a small breaking change. I realized I didn’t bump flutter_chat_ui to a new minor version before publishing - sorry about that!

Fix is simple: if you have a custom ChatController, the set operation now requires a messages array.

  1. If you were using named parameters like set(messages: messages), change it to: set(messages)
  2. If you previously used set() with no arguments, replace it with: set([])

  • FIX: add username widget. (892ee622)
  • FIX: expose user_cache and make it a changenotifier. (baa7eee6)
  • FIX: expose headers for avatar and image message. (0261ce1c)
  • FIX: gemini example with option to stop a stream. (fa558e46)
  • FEAT: make messages required for set operation. (9e123732)

v2.3.0

22 May 20:39
Compare
Choose a tag to compare

2.3.0

⚠️ Breaking Changes ⚠️

  • Renamed LinkPreviewLinkPreviewData

  • LinkPreview.imageUrlLinkPreviewData.image.url

  • Both LinkPreviewData.image.width and LinkPreviewData.image.height are now required

  • FEAT: link preview v2 (#784). (b65060e1)

2.2.4

  • FIX: add physics param to the ChatAnimatedList(Reversed). (ede3a170)
  • FIX: emptyChatList not clickable (#787). (88937baa)

2.2.3

2.2.2

2.2.1

  • FIX: list rebuilding when keyboard opens/closes. (48e28e7e)

v2.2.0

17 May 14:11
Compare
Choose a tag to compare

2.2.0

⚠️ Breaking Changes ⚠️

  • ChatAnimatedList Redesign:
    • Significantly overhauled for robust handling of asynchronous controller updates.
    • The update operation (ChatOperation.update) now requires the index of the message to be updated.
  • CRITICAL: When implementing custom ChatControllers, you MUST now fetch the most up-to-date message instance from your data source before passing it to remove or update operations. The internal list now relies on the exact object reference. Failing to do so will lead to errors or unexpected behavior. (See InMemoryChatController for an example of fetching the actual message before emitting ChatOperation.remove or ChatOperation.update).

✨ Key Enhancements & Fixes ✨

  • Asynchronous Operations: ChatAnimatedList now uses an internal operation queue to serialize updates, preventing race conditions and resolving prior StreamOperation issues.
  • List Factorization: Common logic between normal and reversed ChatAnimatedList instances has been factorized, improving maintainability.
  • Bulk Insertions: Added insertAllMessages to ChatController and ChatAnimatedList for efficient bulk message additions with animations.
  • Diffing & Stability: ChatController's setMessages now uses an improved DiffUtil (with move support), fixing "out of bounds" errors during complex list updates.
  • Data Consistency: The controller now fetches the latest message version before updates or deletions to ensure operations use current data.
  • Bug Fixes:
    • Corrected message insertion position in reversed lists (#754, #755).
    • Ensured message update operations are correctly persisted (#778).
  • Testing: Introduced integration tests for ChatAnimatedList to validate list operations and item positioning.

  • FIX: update operation not persisted in the list (#778). (37472015)
  • FEAT: Fix StreamOperation Async issues / create insertAll / fixInsert on reverted list (#756). (60395f9b)

2.1.3

  • FIX: hide attachmentButton if no there is no onAttachmentTap provided (#757). (2eae2002)

2.1.2

  • FIX: add audio message type. (8d2b705a)

2.1.1

  • FIX: add video message type. (93a13840)

2.1.0

03 May 18:34
Compare
Choose a tag to compare

2.1.0

⚠️ Breaking Changes ⚠️

Chat controller methods have been renamed to avoid name conflicts with Riverpod.

  • insert -> insertMessage

  • update -> updateMessage

  • remove -> removeMessage

  • set -> setMessages

  • FEAT: rename chat controller methods. (dc1bf57d)

  • FIX: improve documentation and add example. (113141b3)

  • FIX: document public APIs.

2.0.0

01 May 21:23
Compare
Choose a tag to compare
  • Version 2.0.0 is a major update where we completely rebuilt the library. This version focuses on better performance, more customization options, and improved stability. We have added many new features and improvements to make your experience better. For more details, check out our blog post: https://flyer.chat/blog/v2-announcement/ 🚀

2.0.0-dev.11

01 May 11:18
Compare
Choose a tag to compare
2.0.0-dev.11 Pre-release
Pre-release

⚠️ Breaking Changes ⚠️

  • Enhanced pagination functionality for the ChatAnimatedList widget. If you utilize the paginationThreshold parameter, please refer to the comments in the ChatAnimatedList widget implementation for detailed guidance.
  • Updated the Message model to rename parentId to replyToMessageId
  • The createdAt field is now optional in the message model
  • The sending field has been removed from the message model; instead, you can set sending: true in the metadata of the Message model to achieve the same functionality.
  • The isOnlyEmoji property has been removed from the text message model; to indicate that a message contains only emojis, use isOnlyEmoji: true in the metadata of the text message.
  • The firstName and lastName fields in the User model have been consolidated into a single name field for improved simplicity.
  • The default sentinel values that previously allowed users to set specific properties to null have been removed. Instead, please use Colors.transparent, BorderRadius.zero, or TextStyle() to achieve the desired effect. Passing null will now use the standard configuration.

⚠️ New Features ⚠️

  • Added a headerWidget to the ChatMessage widget, enabling the display of a custom header for each message. You have the flexibility to control the header's position; wrap it with a Center widget for centering.
  • Introduced new parameters: sentMessageColumnAlignment, receivedMessageColumnAlignment, sentMessageRowAlignment, and receivedMessageRowAlignment for the ChatMessage widget. These allow for precise control over the positioning of leadingWidget, trailingWidget, topWidget, and bottomWidget. Ensure correct defaults are set for proper alignment, especially when using the topWidget.
  • Introduced TextStreamMessage type to support text streaming
  • Added textStreamMessageBuilder to the Builders class to support text streaming UI widget

Other changes

  • Introduced MessageID and UserID typedefs to provide clearer context, while maintaining their underlying type as Strings
  • Do not show status for received messages
  • Added example for text streaming

2.0.0-dev.10

29 Apr 05:45
Compare
Choose a tag to compare
2.0.0-dev.10 Pre-release
Pre-release

⚠️ Breaking Changes ⚠️

  • Rename ChatInput to Composer
  • Rename ChatInputHeightNotifier to ComposerHeightNotifier
  • Rename inputBuilder to composerBuilder

2.0.0-dev.9

06 Apr 21:16
Compare
Choose a tag to compare
2.0.0-dev.9 Pre-release
Pre-release

⚠️ Breaking Changes ⚠️

  • Requires Freezed 3.0.0
  • Replace status field with a computed getter that determines message state based on lifecycle timestamps (createdAt, deletedAt, sending, failedAt, sentAt, deliveredAt, seenAt, updatedAt). This enables granular message history tracking and status transitions, matching the behavior of popular chat applications.
  • Rename overlay to hasOverlay in ImageMessage

Other changes

  • Downgrade intl package version for better compatibility with other Flutter packages
  • Added FileMessage support to the example project
  • Migrated web storage implementation from indexed_db to idb_shim for improved cross-platform compatibility and better performance

2.0.0-dev.8

25 Mar 17:29
Compare
Choose a tag to compare
2.0.0-dev.8 Pre-release
Pre-release

⚠️ Breaking Changes ⚠️

  • Package requires intl package for date/time formatting

⚠️ New features ⚠️

  • Added support for long press actions on messages with customizable callback
  • Added system message for displaying system notifications and events in chat
  • Added examples demonstrating both long press handling and system messages
  • Added message status indicators (delivered, error, seen, sending, sent)
  • Added message timestamps with customizable format, position

2.0.0-dev.7

16 Mar 22:35
Compare
Choose a tag to compare
2.0.0-dev.7 Pre-release
Pre-release

⚠️ Breaking Changes ⚠️

  • Changed dependency from flutter_markdown to gpt_markdown for the FlyerChatTextMessage class
  • onMessageTap callback now includes message index and tap up details - updated parameters to (Message item, {int? index, TapUpDetails? details})
  • Added more customization options to ChatInput, with default capitalization set to sentences
  • Changed default behavior of Enter key in ChatInput to create a newline instead of sending message
    • To send message on Enter, set textInputAction: TextInputAction.send when configuring ChatInput through builders
    • See local.dart example for how to use builders to customize input behavior

⚠️ New features ⚠️

  • Add ScrollToMessageMixin to enable programmatic scrolling in chat list:
    • scrollToMessage(messageId): Scrolls to a specific message by ID
    • scrollToIndex(index): Scrolls to a message at a specific index
    • Both methods support customizable animation duration, curve, alignment and offset
    • Can be used directly through any ChatController instance
    • See the pagination example in the example project for usage details
  • Add validation to prevent duplicate message IDs
  • Added support for sending messages using Shift+Enter keyboard shortcut in ChatInput

🐛 Bug Fixes

  • Fixed flickering in avatar widget by implementing a user cache with LRU eviction strategy, allowing synchronous access to recently resolved user data