Merge pull request #1643 from GetStream/fix/message-widget-width-factor

This commit is contained in:
Sahil Kumar
2023-06-29 16:34:12 +05:30
committed by GitHub
2 changed files with 12 additions and 13 deletions
@@ -16,6 +16,8 @@
> **Note** > **Note**
> This fix depends on the [image_gallery_saver](https://pub.dev/packages/image_gallery_saver) plugin. Make sure to add > 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. 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 ✅ Added
@@ -188,9 +188,7 @@ class _MessageCardState extends State<MessageCard> {
attachmentPadding: widget.attachmentPadding, attachmentPadding: widget.attachmentPadding,
), ),
if (!widget.isGiphy) if (!widget.isGiphy)
ConstrainedBox( TextBubble(
constraints: BoxConstraints.loose(const Size.fromWidth(500)),
child: TextBubble(
messageTheme: widget.messageTheme, messageTheme: widget.messageTheme,
message: widget.message, message: widget.message,
textPadding: widget.textPadding, textPadding: widget.textPadding,
@@ -201,7 +199,6 @@ class _MessageCardState extends State<MessageCard> {
onLinkTap: widget.onLinkTap, onLinkTap: widget.onLinkTap,
onMentionTap: widget.onMentionTap, onMentionTap: widget.onMentionTap,
), ),
),
if (widget.hasUrlAttachments && !widget.hasQuotedMessage) if (widget.hasUrlAttachments && !widget.hasQuotedMessage)
_buildUrlAttachment(), _buildUrlAttachment(),
], ],