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? canGetStatistics,
  14. bool? canGetMessageThread,
  15. bool? canGetViewers,
  16. bool? canGetMediaTimestampLinks,
  17. bool? hasTimestampedMedia,
  18. bool? isChannelPost,
  19. bool? containsUnreadMention,
  20. int? date,
  21. int? editDate,
  22. MessageForwardInfo? forwardInfo,
  23. MessageInteractionInfo? interactionInfo,
  24. int? replyInChatId,
  25. int? replyToMessageId,
  26. int? messageThreadId,
  27. int? ttl,
  28. double? ttlExpiresIn,
  29. int? viaBotUserId,
  30. String? authorSignature,
  31. int? mediaAlbumId,
  32. String? restrictionReason,
  33. MessageContent? content,
  34. ReplyMarkup? replyMarkup,
  35. dynamic extra,
  36. 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? canGetStatistics,
  bool? canGetMessageThread,
  bool? canGetViewers,
  bool? canGetMediaTimestampLinks,
  bool? hasTimestampedMedia,
  bool? isChannelPost,
  bool? containsUnreadMention,
  int? date,
  int? editDate,
  MessageForwardInfo? forwardInfo,
  MessageInteractionInfo? interactionInfo,
  int? replyInChatId,
  int? replyToMessageId,
  int? messageThreadId,
  int? ttl,
  double? ttlExpiresIn,
  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,
  canGetStatistics: canGetStatistics ?? this.canGetStatistics,
  canGetMessageThread: canGetMessageThread ?? this.canGetMessageThread,
  canGetViewers: canGetViewers ?? this.canGetViewers,
  canGetMediaTimestampLinks: canGetMediaTimestampLinks ?? this.canGetMediaTimestampLinks,
  hasTimestampedMedia: hasTimestampedMedia ?? this.hasTimestampedMedia,
  isChannelPost: isChannelPost ?? this.isChannelPost,
  containsUnreadMention: containsUnreadMention ?? this.containsUnreadMention,
  date: date ?? this.date,
  editDate: editDate ?? this.editDate,
  forwardInfo: forwardInfo ?? this.forwardInfo,
  interactionInfo: interactionInfo ?? this.interactionInfo,
  replyInChatId: replyInChatId ?? this.replyInChatId,
  replyToMessageId: replyToMessageId ?? this.replyToMessageId,
  messageThreadId: messageThreadId ?? this.messageThreadId,
  ttl: ttl ?? this.ttl,
  ttlExpiresIn: ttlExpiresIn ?? this.ttlExpiresIn,
  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,
);