From a311463cab9df4a28ff6ac173c68d577d69c9bb1 Mon Sep 17 00:00:00 2001 From: Sahil Kumar Date: Thu, 29 Jun 2023 16:23:16 +0530 Subject: [PATCH 1/2] fix(ui): fix `MessageWidget.widthFactor` not working on web/desktop. Signed-off-by: xsahil03x --- .../lib/src/message_widget/message_card.dart | 23 ++++++++----------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/packages/stream_chat_flutter/lib/src/message_widget/message_card.dart b/packages/stream_chat_flutter/lib/src/message_widget/message_card.dart index 5cd93efc..9491b0da 100644 --- a/packages/stream_chat_flutter/lib/src/message_widget/message_card.dart +++ b/packages/stream_chat_flutter/lib/src/message_widget/message_card.dart @@ -188,19 +188,16 @@ class _MessageCardState extends State { attachmentPadding: widget.attachmentPadding, ), if (!widget.isGiphy) - ConstrainedBox( - constraints: BoxConstraints.loose(const Size.fromWidth(500)), - child: TextBubble( - messageTheme: widget.messageTheme, - message: widget.message, - textPadding: widget.textPadding, - textBuilder: widget.textBuilder, - isOnlyEmoji: widget.isOnlyEmoji, - hasQuotedMessage: widget.hasQuotedMessage, - hasUrlAttachments: widget.hasUrlAttachments, - onLinkTap: widget.onLinkTap, - onMentionTap: widget.onMentionTap, - ), + TextBubble( + messageTheme: widget.messageTheme, + message: widget.message, + textPadding: widget.textPadding, + textBuilder: widget.textBuilder, + isOnlyEmoji: widget.isOnlyEmoji, + hasQuotedMessage: widget.hasQuotedMessage, + hasUrlAttachments: widget.hasUrlAttachments, + onLinkTap: widget.onLinkTap, + onMentionTap: widget.onMentionTap, ), if (widget.hasUrlAttachments && !widget.hasQuotedMessage) _buildUrlAttachment(), From cb22267c7181a69f91974335a40e07bfe3b73f72 Mon Sep 17 00:00:00 2001 From: Sahil Kumar Date: Thu, 29 Jun 2023 16:24:44 +0530 Subject: [PATCH 2/2] chore: update CHANGELOG.md Signed-off-by: xsahil03x --- packages/stream_chat_flutter/CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/stream_chat_flutter/CHANGELOG.md b/packages/stream_chat_flutter/CHANGELOG.md index d2ca7e28..ceaf1683 100644 --- a/packages/stream_chat_flutter/CHANGELOG.md +++ b/packages/stream_chat_flutter/CHANGELOG.md @@ -16,6 +16,8 @@ > **Note** > This fix depends on the [image_gallery_saver](https://pub.dev/packages/image_gallery_saver) plugin. Make sure to add necessary permissions in your App as per the plugin documentation. +- [[#1642]](https://github.com/GetStream/stream-chat-flutter/issues/1642) Fixed `StreamMessageWidget.widthFactor` not + working on web and desktop platforms. ✅ Added