copyWith method

Message copyWith({
  1. int? id,
  2. MessageSender? senderId,
  3. MessageSender? receiverId,
  4. int? chatId,
  5. MessageSendingState? sendingState,
  6. MessageSchedulingState? schedulingState,
  7. bool? isOutgoing,
  8. bool? isPinned,
  9. bool? isFromOffline,
  10. bool? canBeSaved,
  11. bool? hasTimestampedMedia,
  12. bool? isChannelPost,
  13. bool? isPaidStarSuggestedPost,
  14. bool? isPaidGramSuggestedPost,
  15. bool? containsUnreadMention,
  16. bool? containsUnreadPollVotes,
  17. int? date,
  18. int? editDate,
  19. MessageForwardInfo? forwardInfo,
  20. MessageImportInfo? importInfo,
  21. MessageInteractionInfo? interactionInfo,
  22. List<UnreadReaction>? unreadReactions,
  23. FactCheck? factCheck,
  24. SuggestedPostInfo? suggestedPostInfo,
  25. MessageReplyTo? replyTo,
  26. MessageTopic? topicId,
  27. MessageSelfDestructType? selfDestructType,
  28. double? selfDestructIn,
  29. double? autoDeleteIn,
  30. int? viaBotUserId,
  31. MessageSender? guestBotCallerId,
  32. int? senderBusinessBotUserId,
  33. int? senderBoostCount,
  34. String? senderTag,
  35. int? paidMessageStarCount,
  36. String? authorSignature,
  37. int? mediaAlbumId,
  38. int? effectId,
  39. RestrictionInfo? restrictionInfo,
  40. String? summaryLanguageCode,
  41. MessageContent? content,
  42. EphemeralMessageContent? ephemeralContent,
  43. ReplyMarkup? replyMarkup,
  44. int? ephemeralMessageId,
  45. int? chatInstance,
})

Implementation

Message copyWith({
  int? id,
  MessageSender? senderId,
  MessageSender? receiverId,
  int? chatId,
  MessageSendingState? sendingState,
  MessageSchedulingState? schedulingState,
  bool? isOutgoing,
  bool? isPinned,
  bool? isFromOffline,
  bool? canBeSaved,
  bool? hasTimestampedMedia,
  bool? isChannelPost,
  bool? isPaidStarSuggestedPost,
  bool? isPaidGramSuggestedPost,
  bool? containsUnreadMention,
  bool? containsUnreadPollVotes,
  int? date,
  int? editDate,
  MessageForwardInfo? forwardInfo,
  MessageImportInfo? importInfo,
  MessageInteractionInfo? interactionInfo,
  List<UnreadReaction>? unreadReactions,
  FactCheck? factCheck,
  SuggestedPostInfo? suggestedPostInfo,
  MessageReplyTo? replyTo,
  MessageTopic? topicId,
  MessageSelfDestructType? selfDestructType,
  double? selfDestructIn,
  double? autoDeleteIn,
  int? viaBotUserId,
  MessageSender? guestBotCallerId,
  int? senderBusinessBotUserId,
  int? senderBoostCount,
  String? senderTag,
  int? paidMessageStarCount,
  String? authorSignature,
  int? mediaAlbumId,
  int? effectId,
  RestrictionInfo? restrictionInfo,
  String? summaryLanguageCode,
  MessageContent? content,
  EphemeralMessageContent? ephemeralContent,
  ReplyMarkup? replyMarkup,
  int? ephemeralMessageId,
  int? chatInstance,
}) =>
    Message(
      id: id ?? this.id,
      senderId: senderId ?? this.senderId,
      receiverId: receiverId ?? this.receiverId,
      chatId: chatId ?? this.chatId,
      sendingState: sendingState ?? this.sendingState,
      schedulingState: schedulingState ?? this.schedulingState,
      isOutgoing: isOutgoing ?? this.isOutgoing,
      isPinned: isPinned ?? this.isPinned,
      isFromOffline: isFromOffline ?? this.isFromOffline,
      canBeSaved: canBeSaved ?? this.canBeSaved,
      hasTimestampedMedia: hasTimestampedMedia ?? this.hasTimestampedMedia,
      isChannelPost: isChannelPost ?? this.isChannelPost,
      isPaidStarSuggestedPost:
          isPaidStarSuggestedPost ?? this.isPaidStarSuggestedPost,
      isPaidGramSuggestedPost:
          isPaidGramSuggestedPost ?? this.isPaidGramSuggestedPost,
      containsUnreadMention:
          containsUnreadMention ?? this.containsUnreadMention,
      containsUnreadPollVotes:
          containsUnreadPollVotes ?? this.containsUnreadPollVotes,
      date: date ?? this.date,
      editDate: editDate ?? this.editDate,
      forwardInfo: forwardInfo ?? this.forwardInfo,
      importInfo: importInfo ?? this.importInfo,
      interactionInfo: interactionInfo ?? this.interactionInfo,
      unreadReactions: unreadReactions ?? this.unreadReactions,
      factCheck: factCheck ?? this.factCheck,
      suggestedPostInfo: suggestedPostInfo ?? this.suggestedPostInfo,
      replyTo: replyTo ?? this.replyTo,
      topicId: topicId ?? this.topicId,
      selfDestructType: selfDestructType ?? this.selfDestructType,
      selfDestructIn: selfDestructIn ?? this.selfDestructIn,
      autoDeleteIn: autoDeleteIn ?? this.autoDeleteIn,
      viaBotUserId: viaBotUserId ?? this.viaBotUserId,
      guestBotCallerId: guestBotCallerId ?? this.guestBotCallerId,
      senderBusinessBotUserId:
          senderBusinessBotUserId ?? this.senderBusinessBotUserId,
      senderBoostCount: senderBoostCount ?? this.senderBoostCount,
      senderTag: senderTag ?? this.senderTag,
      paidMessageStarCount: paidMessageStarCount ?? this.paidMessageStarCount,
      authorSignature: authorSignature ?? this.authorSignature,
      mediaAlbumId: mediaAlbumId ?? this.mediaAlbumId,
      effectId: effectId ?? this.effectId,
      restrictionInfo: restrictionInfo ?? this.restrictionInfo,
      summaryLanguageCode: summaryLanguageCode ?? this.summaryLanguageCode,
      content: content ?? this.content,
      ephemeralContent: ephemeralContent ?? this.ephemeralContent,
      replyMarkup: replyMarkup ?? this.replyMarkup,
      ephemeralMessageId: ephemeralMessageId ?? this.ephemeralMessageId,
      chatInstance: chatInstance ?? this.chatInstance,
    );