StreamMessageWidget constructor
const
StreamMessageWidget({
- Key? key,
- required Message message,
- required StreamMessageThemeData messageTheme,
- bool reverse = false,
- bool translateUserAvatar = true,
- ShapeBorder? shape,
- BorderSide? borderSide,
- BorderRadiusGeometry? borderRadiusGeometry,
- ShapeBorder? attachmentShape,
- void onMentionTap()?,
- void onMessageTap()?,
- OnReactionsTap? onReactionsTap,
- OnReactionsHover? onReactionsHover,
- bool showReactionPicker = true,
- DisplayWidget showUserAvatar = DisplayWidget.show,
- bool showSendingIndicator = true,
- bool showThreadReplyIndicator = false,
- bool showInChannelIndicator = false,
- void onReplyTap()?,
- void onThreadTap()?,
- Future<
void> onConfirmDeleteTap()?, - bool showUsername = true,
- bool showTimestamp = true,
- bool showReactions = true,
- bool showDeleteMessage = true,
- bool showEditMessage = true,
- bool showReplyMessage = true,
- bool showThreadReplyMessage = true,
- bool showMarkUnreadMessage = true,
- bool showResendMessage = true,
- bool showCopyMessage = true,
- bool showFlagButton = true,
- bool showPinButton = true,
- bool showPinHighlight = true,
- void onUserAvatarTap()?,
- void onLinkTap()?,
- void onMessageActions()?,
- ShowMessageCallback? onShowMessage,
- Widget userAvatarBuilder()?,
- Widget quotedMessageBuilder()?,
- Widget editMessageInputBuilder()?,
- Widget textBuilder()?,
- BottomRowBuilderWithDefaultWidget? bottomRowBuilderWithDefaultWidget,
- List<
StreamAttachmentWidgetBuilder> ? attachmentBuilders, - EdgeInsetsGeometry? padding,
- EdgeInsets textPadding = const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
- EdgeInsetsGeometry attachmentPadding = EdgeInsets.zero,
- double widthFactor = 0.78,
- OnQuotedMessageTap? onQuotedMessageTap,
- List<
StreamMessageAction> customActions = const [], - StreamAttachmentWidgetTapCallback? onAttachmentTap,
- Size imageAttachmentThumbnailSize = const Size(400, 400),
- String imageAttachmentThumbnailResizeType = 'clip',
- String imageAttachmentThumbnailCropType = 'center',
- AttachmentActionsBuilder? attachmentActionsModalBuilder,
Shows a message with reactions, replies and user avatar.
Usually you don't use this widget as it's the default message widget used by
MessageListView
.
The widget components render the ui based on the first ancestor of type StreamChatTheme. Modify it to change the widget appearance.
Implementation
const StreamMessageWidget({
super.key,
required this.message,
required this.messageTheme,
this.reverse = false,
this.translateUserAvatar = true,
this.shape,
this.borderSide,
this.borderRadiusGeometry,
this.attachmentShape,
this.onMentionTap,
this.onMessageTap,
this.onReactionsTap,
this.onReactionsHover,
this.showReactionPicker = true,
this.showUserAvatar = DisplayWidget.show,
this.showSendingIndicator = true,
this.showThreadReplyIndicator = false,
this.showInChannelIndicator = false,
this.onReplyTap,
this.onThreadTap,
this.onConfirmDeleteTap,
this.showUsername = true,
this.showTimestamp = true,
this.showReactions = true,
this.showDeleteMessage = true,
this.showEditMessage = true,
this.showReplyMessage = true,
this.showThreadReplyMessage = true,
this.showMarkUnreadMessage = true,
this.showResendMessage = true,
this.showCopyMessage = true,
this.showFlagButton = true,
this.showPinButton = true,
this.showPinHighlight = true,
this.onUserAvatarTap,
this.onLinkTap,
this.onMessageActions,
this.onShowMessage,
this.userAvatarBuilder,
this.quotedMessageBuilder,
this.editMessageInputBuilder,
this.textBuilder,
this.bottomRowBuilderWithDefaultWidget,
this.attachmentBuilders,
this.padding,
this.textPadding = const EdgeInsets.symmetric(
horizontal: 16,
vertical: 8,
),
this.attachmentPadding = EdgeInsets.zero,
this.widthFactor = 0.78,
this.onQuotedMessageTap,
this.customActions = const [],
this.onAttachmentTap,
this.imageAttachmentThumbnailSize = const Size(400, 400),
this.imageAttachmentThumbnailResizeType = 'clip',
this.imageAttachmentThumbnailCropType = 'center',
this.attachmentActionsModalBuilder,
});