From 1179c6a109832339fc45a33beed3e41c36b0e213 Mon Sep 17 00:00:00 2001 From: Deven Joshi Date: Thu, 16 Sep 2021 15:51:51 +0530 Subject: [PATCH] corrected attachment builders --- packages/stream_chat_flutter/lib/src/message_widget.dart | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/stream_chat_flutter/lib/src/message_widget.dart b/packages/stream_chat_flutter/lib/src/message_widget.dart index 7ceca3ad..4025337c 100644 --- a/packages/stream_chat_flutter/lib/src/message_widget.dart +++ b/packages/stream_chat_flutter/lib/src/message_widget.dart @@ -96,7 +96,7 @@ class MessageWidget extends StatefulWidget { this.bottomRowBuilder, this.deletedBottomRowBuilder, this.onReturnAction, - Map? customAttachmentBuilders, + this.customAttachmentBuilders, this.readList, this.padding, this.textPadding = const EdgeInsets.symmetric( @@ -406,6 +406,9 @@ class MessageWidget extends StatefulWidget { /// Builder for respective attachment types final Map attachmentBuilders; + /// Builder for respective attachment types (user facing builder) + final Map? customAttachmentBuilders; + /// Center user avatar with bottom of the message final bool translateUserAvatar; @@ -530,7 +533,7 @@ class MessageWidget extends StatefulWidget { showPinButton: showPinButton ?? this.showPinButton, showPinHighlight: showPinHighlight ?? this.showPinHighlight, customAttachmentBuilders: - customAttachmentBuilders ?? attachmentBuilders, + customAttachmentBuilders ?? this.customAttachmentBuilders, translateUserAvatar: translateUserAvatar ?? this.translateUserAvatar, onQuotedMessageTap: onQuotedMessageTap ?? this.onQuotedMessageTap, onMessageTap: onMessageTap ?? this.onMessageTap,