copyWith method

MessageWidget copyWith({
  1. Key? key,
  2. void onMentionTap(
    1. User
    )?,
  3. void onThreadTap(
    1. Message
    )?,
  4. void onReplyTap(
    1. Message
    )?,
  5. Widget editMessageInputBuilder(
    1. BuildContext,
    2. Message
    )?,
  6. Widget textBuilder(
    1. BuildContext,
    2. Message
    )?,
  7. Widget usernameBuilder(
    1. BuildContext,
    2. Message
    )?,
  8. Widget bottomRowBuilder(
    1. BuildContext,
    2. Message
    )?,
  9. Widget deletedBottomRowBuilder(
    1. BuildContext,
    2. Message
    )?,
  10. void onMessageActions(
    1. BuildContext,
    2. Message
    )?,
  11. Message? message,
  12. MessageThemeData? messageTheme,
  13. bool? reverse,
  14. ShapeBorder? shape,
  15. ShapeBorder? attachmentShape,
  16. BorderSide? borderSide,
  17. BorderSide? attachmentBorderSide,
  18. BorderRadiusGeometry? borderRadiusGeometry,
  19. BorderRadiusGeometry? attachmentBorderRadiusGeometry,
  20. EdgeInsetsGeometry? padding,
  21. EdgeInsets? textPadding,
  22. EdgeInsetsGeometry? attachmentPadding,
  23. DisplayWidget? showUserAvatar,
  24. bool? showSendingIndicator,
  25. bool? showReactions,
  26. bool? allRead,
  27. bool? showThreadReplyIndicator,
  28. bool? showInChannelIndicator,
  29. void onUserAvatarTap(
    1. User
    )?,
  30. void onLinkTap(
    1. String
    )?,
  31. bool? showReactionPickerIndicator,
  32. List<Read>? readList,
  33. ShowMessageCallback? onShowMessage,
  34. ValueChanged<ReturnActionType>? onReturnAction,
  35. bool? showUsername,
  36. bool? showTimestamp,
  37. bool? showReplyMessage,
  38. bool? showThreadReplyMessage,
  39. bool? showEditMessage,
  40. bool? showCopyMessage,
  41. bool? showDeleteMessage,
  42. bool? showResendMessage,
  43. bool? showFlagButton,
  44. bool? showPinButton,
  45. bool? showPinHighlight,
  46. Map<String, AttachmentBuilder>? customAttachmentBuilders,
  47. bool? translateUserAvatar,
  48. OnQuotedMessageTap? onQuotedMessageTap,
  49. void onMessageTap(
    1. Message
    )?,
  50. List<MessageAction>? customActions,
  51. void onAttachmentTap(
    1. Message message,
    2. Attachment attachment
    )?,
  52. Widget userAvatarBuilder(
    1. BuildContext,
    2. User
    )?,
})

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,
    );