copyWith method

Message copyWith({
  1. int? id,
  2. MessageSender? senderId,
  3. int? chatId,
  4. MessageSendingState? sendingState,
  5. MessageSchedulingState? schedulingState,
  6. bool? isOutgoing,
  7. bool? isPinned,
  8. bool? canBeEdited,
  9. bool? canBeForwarded,
  10. bool? canBeSaved,
  11. bool? canBeDeletedOnlyForSelf,
  12. bool? canBeDeletedForAllUsers,
  13. bool? canGetAddedReactions,
  14. bool? canGetStatistics,
  15. bool? canGetMessageThread,
  16. bool? canGetViewers,
  17. bool? canGetMediaTimestampLinks,
  18. bool? canReportReactions,
  19. bool? hasTimestampedMedia,
  20. bool? isChannelPost,
  21. bool? isTopicMessage,
  22. bool? containsUnreadMention,
  23. int? date,
  24. int? editDate,
  25. MessageForwardInfo? forwardInfo,
  26. MessageInteractionInfo? interactionInfo,
  27. List<UnreadReaction>? unreadReactions,
  28. MessageReplyTo? replyTo,
  29. int? messageThreadId,
  30. int? selfDestructTime,
  31. double? selfDestructIn,
  32. double? autoDeleteIn,
  33. int? viaBotUserId,
  34. String? authorSignature,
  35. int? mediaAlbumId,
  36. String? restrictionReason,
  37. MessageContent? content,
  38. ReplyMarkup? replyMarkup,
  39. dynamic extra,
  40. int? clientId,
})

Implementation

Message copyWith({
  int? id,
  MessageSender? senderId,
  int? chatId,
  MessageSendingState? sendingState,
  MessageSchedulingState? schedulingState,
  bool? isOutgoing,
  bool? isPinned,
  bool? canBeEdited,
  bool? canBeForwarded,
  bool? canBeSaved,
  bool? canBeDeletedOnlyForSelf,
  bool? canBeDeletedForAllUsers,
  bool? canGetAddedReactions,
  bool? canGetStatistics,
  bool? canGetMessageThread,
  bool? canGetViewers,
  bool? canGetMediaTimestampLinks,
  bool? canReportReactions,
  bool? hasTimestampedMedia,
  bool? isChannelPost,
  bool? isTopicMessage,
  bool? containsUnreadMention,
  int? date,
  int? editDate,
  MessageForwardInfo? forwardInfo,
  MessageInteractionInfo? interactionInfo,
  List<UnreadReaction>? unreadReactions,
  MessageReplyTo? replyTo,
  int? messageThreadId,
  int? selfDestructTime,
  double? selfDestructIn,
  double? autoDeleteIn,
  int? viaBotUserId,
  String? authorSignature,
  int? mediaAlbumId,
  String? restrictionReason,
  MessageContent? content,
  ReplyMarkup? replyMarkup,
  dynamic extra,
  int? clientId,
}) =>
    Message(
      id: id ?? this.id,
      senderId: senderId ?? this.senderId,
      chatId: chatId ?? this.chatId,
      sendingState: sendingState ?? this.sendingState,
      schedulingState: schedulingState ?? this.schedulingState,
      isOutgoing: isOutgoing ?? this.isOutgoing,
      isPinned: isPinned ?? this.isPinned,
      canBeEdited: canBeEdited ?? this.canBeEdited,
      canBeForwarded: canBeForwarded ?? this.canBeForwarded,
      canBeSaved: canBeSaved ?? this.canBeSaved,
      canBeDeletedOnlyForSelf:
          canBeDeletedOnlyForSelf ?? this.canBeDeletedOnlyForSelf,
      canBeDeletedForAllUsers:
          canBeDeletedForAllUsers ?? this.canBeDeletedForAllUsers,
      canGetAddedReactions: canGetAddedReactions ?? this.canGetAddedReactions,
      canGetStatistics: canGetStatistics ?? this.canGetStatistics,
      canGetMessageThread: canGetMessageThread ?? this.canGetMessageThread,
      canGetViewers: canGetViewers ?? this.canGetViewers,
      canGetMediaTimestampLinks:
          canGetMediaTimestampLinks ?? this.canGetMediaTimestampLinks,
      canReportReactions: canReportReactions ?? this.canReportReactions,
      hasTimestampedMedia: hasTimestampedMedia ?? this.hasTimestampedMedia,
      isChannelPost: isChannelPost ?? this.isChannelPost,
      isTopicMessage: isTopicMessage ?? this.isTopicMessage,
      containsUnreadMention:
          containsUnreadMention ?? this.containsUnreadMention,
      date: date ?? this.date,
      editDate: editDate ?? this.editDate,
      forwardInfo: forwardInfo ?? this.forwardInfo,
      interactionInfo: interactionInfo ?? this.interactionInfo,
      unreadReactions: unreadReactions ?? this.unreadReactions,
      replyTo: replyTo ?? this.replyTo,
      messageThreadId: messageThreadId ?? this.messageThreadId,
      selfDestructTime: selfDestructTime ?? this.selfDestructTime,
      selfDestructIn: selfDestructIn ?? this.selfDestructIn,
      autoDeleteIn: autoDeleteIn ?? this.autoDeleteIn,
      viaBotUserId: viaBotUserId ?? this.viaBotUserId,
      authorSignature: authorSignature ?? this.authorSignature,
      mediaAlbumId: mediaAlbumId ?? this.mediaAlbumId,
      restrictionReason: restrictionReason ?? this.restrictionReason,
      content: content ?? this.content,
      replyMarkup: replyMarkup ?? this.replyMarkup,
      extra: extra ?? this.extra,
      clientId: clientId ?? this.clientId,
    );