From 04f13bee4d54dfcafa015a1077ca13bbee5b78e8 Mon Sep 17 00:00:00 2001 From: Sahil Kumar Date: Wed, 21 Jun 2023 20:14:36 +0530 Subject: [PATCH] feat: introduce `quotedMessageAttachmentThumbnailBuilders`. Signed-off-by: xsahil03x --- .../lib/src/message_input/stream_message_input.dart | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/stream_chat_flutter/lib/src/message_input/stream_message_input.dart b/packages/stream_chat_flutter/lib/src/message_input/stream_message_input.dart index 4f60ae70..97391d6a 100644 --- a/packages/stream_chat_flutter/lib/src/message_input/stream_message_input.dart +++ b/packages/stream_chat_flutter/lib/src/message_input/stream_message_input.dart @@ -131,6 +131,7 @@ class StreamMessageInput extends StatefulWidget { this.mentionAllAppUsers = false, this.sendButtonBuilder, this.quotedMessageBuilder, + this.quotedMessageAttachmentThumbnailBuilders, this.shouldKeepFocusAfterMessage, this.validator = _defaultValidator, this.restorationId, @@ -238,6 +239,13 @@ class StreamMessageInput extends StatefulWidget { @Deprecated('Use `mediaAttachmentBuilder` instead.') final Map? attachmentThumbnailBuilders; + /// Map that defines a thumbnail builder for an attachment type. + /// + /// This is used to build the thumbnail for the attachment in the quoted + /// message. + final Map? + quotedMessageAttachmentThumbnailBuilders; + /// The focus node associated to the TextField. final FocusNode? focusNode; @@ -1173,7 +1181,8 @@ class StreamMessageInputState extends State messageTheme: _streamChatTheme.otherMessageTheme, padding: const EdgeInsets.fromLTRB(8, 8, 8, 0), onQuotedMessageClear: widget.onQuotedMessageCleared, - attachmentThumbnailBuilders: widget.attachmentThumbnailBuilders, + attachmentThumbnailBuilders: + widget.quotedMessageAttachmentThumbnailBuilders, ); }