copyWith method
MessageWidget
copyWith({
- Key? key,
- void onMentionTap()?,
- void onThreadTap()?,
- void onReplyTap()?,
- Widget editMessageInputBuilder()?,
- Widget textBuilder()?,
- Widget usernameBuilder()?,
- Widget bottomRowBuilder()?,
- Widget deletedBottomRowBuilder()?,
- void onMessageActions()?,
- Message? message,
- MessageThemeData? messageTheme,
- bool? reverse,
- ShapeBorder? shape,
- ShapeBorder? attachmentShape,
- BorderSide? borderSide,
- BorderSide? attachmentBorderSide,
- BorderRadiusGeometry? borderRadiusGeometry,
- BorderRadiusGeometry? attachmentBorderRadiusGeometry,
- EdgeInsetsGeometry? padding,
- EdgeInsets? textPadding,
- EdgeInsetsGeometry? attachmentPadding,
- DisplayWidget? showUserAvatar,
- bool? showSendingIndicator,
- bool? showReactions,
- bool? allRead,
- bool? showThreadReplyIndicator,
- bool? showInChannelIndicator,
- void onUserAvatarTap()?,
- void onLinkTap()?,
- bool? showReactionPickerIndicator,
- List<
Read> ? readList, - ShowMessageCallback? onShowMessage,
- ValueChanged<
ReturnActionType> ? onReturnAction, - bool? showUsername,
- bool? showTimestamp,
- bool? showReplyMessage,
- bool? showThreadReplyMessage,
- bool? showEditMessage,
- bool? showCopyMessage,
- bool? showDeleteMessage,
- bool? showResendMessage,
- bool? showFlagButton,
- bool? showPinButton,
- bool? showPinHighlight,
- Map<
String, AttachmentBuilder> ? customAttachmentBuilders, - bool? translateUserAvatar,
- OnQuotedMessageTap? onQuotedMessageTap,
- void onMessageTap()?,
- List<
MessageAction> ? customActions, - void onAttachmentTap(
- Message message,
- Attachment attachment
- Widget userAvatarBuilder()?,
Creates a copy of MessageWidget with specified attributes overridden.
Implementation
MessageWidget copyWith({
Key? key,
void Function(User)? onMentionTap,
void Function(Message)? onThreadTap,
void Function(Message)? onReplyTap,
Widget Function(BuildContext, Message)? editMessageInputBuilder,
Widget Function(BuildContext, Message)? textBuilder,
Widget Function(BuildContext, Message)? usernameBuilder,
Widget Function(BuildContext, Message)? bottomRowBuilder,
Widget Function(BuildContext, Message)? deletedBottomRowBuilder,
void Function(BuildContext, Message)? onMessageActions,
Message? message,
MessageThemeData? messageTheme,
bool? reverse,
ShapeBorder? shape,
ShapeBorder? attachmentShape,
BorderSide? borderSide,
BorderSide? attachmentBorderSide,
BorderRadiusGeometry? borderRadiusGeometry,
BorderRadiusGeometry? attachmentBorderRadiusGeometry,
EdgeInsetsGeometry? padding,
EdgeInsets? textPadding,
EdgeInsetsGeometry? attachmentPadding,
DisplayWidget? showUserAvatar,
bool? showSendingIndicator,
bool? showReactions,
bool? allRead,
bool? showThreadReplyIndicator,
bool? showInChannelIndicator,
void Function(User)? onUserAvatarTap,
void Function(String)? onLinkTap,
bool? showReactionPickerIndicator,
List<Read>? readList,
ShowMessageCallback? onShowMessage,
ValueChanged<ReturnActionType>? onReturnAction,
bool? showUsername,
bool? showTimestamp,
bool? showReplyMessage,
bool? showThreadReplyMessage,
bool? showEditMessage,
bool? showCopyMessage,
bool? showDeleteMessage,
bool? showResendMessage,
bool? showFlagButton,
bool? showPinButton,
bool? showPinHighlight,
Map<String, AttachmentBuilder>? customAttachmentBuilders,
bool? translateUserAvatar,
OnQuotedMessageTap? onQuotedMessageTap,
void Function(Message)? onMessageTap,
List<MessageAction>? customActions,
void Function(Message message, Attachment attachment)? onAttachmentTap,
Widget Function(BuildContext, User)? userAvatarBuilder,
}) =>
MessageWidget(
key: key ?? this.key,
onMentionTap: onMentionTap ?? this.onMentionTap,
onThreadTap: onThreadTap ?? this.onThreadTap,
onReplyTap: onReplyTap ?? this.onReplyTap,
editMessageInputBuilder:
editMessageInputBuilder ?? this.editMessageInputBuilder,
textBuilder: textBuilder ?? this.textBuilder,
usernameBuilder: usernameBuilder ?? this.usernameBuilder,
bottomRowBuilder: bottomRowBuilder ?? this.bottomRowBuilder,
deletedBottomRowBuilder:
deletedBottomRowBuilder ?? this.deletedBottomRowBuilder,
onMessageActions: onMessageActions ?? this.onMessageActions,
message: message ?? this.message,
messageTheme: messageTheme ?? this.messageTheme,
reverse: reverse ?? this.reverse,
shape: shape ?? this.shape,
attachmentShape: attachmentShape ?? this.attachmentShape,
borderSide: borderSide ?? this.borderSide,
attachmentBorderSide: attachmentBorderSide ?? this.attachmentBorderSide,
borderRadiusGeometry: borderRadiusGeometry ?? this.borderRadiusGeometry,
attachmentBorderRadiusGeometry: attachmentBorderRadiusGeometry ??
this.attachmentBorderRadiusGeometry,
padding: padding ?? this.padding,
textPadding: textPadding ?? this.textPadding,
attachmentPadding: attachmentPadding ?? this.attachmentPadding,
showUserAvatar: showUserAvatar ?? this.showUserAvatar,
showSendingIndicator: showSendingIndicator ?? this.showSendingIndicator,
showReactions: showReactions ?? this.showReactions,
showThreadReplyIndicator:
showThreadReplyIndicator ?? this.showThreadReplyIndicator,
showInChannelIndicator:
showInChannelIndicator ?? this.showInChannelIndicator,
onUserAvatarTap: onUserAvatarTap ?? this.onUserAvatarTap,
onLinkTap: onLinkTap ?? this.onLinkTap,
showReactionPickerIndicator:
showReactionPickerIndicator ?? this.showReactionPickerIndicator,
onShowMessage: onShowMessage ?? this.onShowMessage,
onReturnAction: onReturnAction ?? this.onReturnAction,
showUsername: showUsername ?? this.showUsername,
showTimestamp: showTimestamp ?? this.showTimestamp,
showReplyMessage: showReplyMessage ?? this.showReplyMessage,
showThreadReplyMessage:
showThreadReplyMessage ?? this.showThreadReplyMessage,
showEditMessage: showEditMessage ?? this.showEditMessage,
showCopyMessage: showCopyMessage ?? this.showCopyMessage,
showDeleteMessage: showDeleteMessage ?? this.showDeleteMessage,
showResendMessage: showResendMessage ?? this.showResendMessage,
showFlagButton: showFlagButton ?? this.showFlagButton,
showPinButton: showPinButton ?? this.showPinButton,
showPinHighlight: showPinHighlight ?? this.showPinHighlight,
customAttachmentBuilders:
customAttachmentBuilders ?? this.customAttachmentBuilders,
translateUserAvatar: translateUserAvatar ?? this.translateUserAvatar,
onQuotedMessageTap: onQuotedMessageTap ?? this.onQuotedMessageTap,
onMessageTap: onMessageTap ?? this.onMessageTap,
customActions: customActions ?? this.customActions,
onAttachmentTap: onAttachmentTap ?? this.onAttachmentTap,
userAvatarBuilder: userAvatarBuilder ?? this.userAvatarBuilder,
);