copyWith method

Message copyWith({
  1. MessageId? id,
  2. String? body,
  3. String? type,
  4. int? t,
  5. String? notifyName,
  6. String? from,
  7. String? to,
  8. String? self,
  9. int? ack,
  10. bool? isNewMsg,
  11. bool? star,
  12. bool? kicNotified,
  13. bool? recvFresh,
  14. bool? isFromTemplate,
  15. bool? pollInvalidated,
  16. bool? broadcast,
  17. bool? isForwarded,
  18. bool? hasReaction,
  19. bool? ephemeralOutOfSync,
  20. bool? productHeaderImageRejected,
  21. int? lastPlaybackProgress,
  22. bool? isDynamicReplyButtonsMsg,
  23. bool? isMdHistoryMsg,
  24. int? stickerSentTs,
  25. bool? requiresDirectConnection,
  26. bool? pttForwardedFeaturesEnabled,
  27. String? caption,
})

Implementation

Message copyWith({
  MessageId? id,
  String? body,
  String? type,
  int? t,
  String? notifyName,
  String? from,
  String? to,
  String? self,
  int? ack,
  bool? isNewMsg,
  bool? star,
  bool? kicNotified,
  bool? recvFresh,
  bool? isFromTemplate,
  bool? pollInvalidated,
  bool? broadcast,
  bool? isForwarded,
  bool? hasReaction,
  bool? ephemeralOutOfSync,
  bool? productHeaderImageRejected,
  int? lastPlaybackProgress,
  bool? isDynamicReplyButtonsMsg,
  bool? isMdHistoryMsg,
  int? stickerSentTs,
  bool? requiresDirectConnection,
  bool? pttForwardedFeaturesEnabled,
  String? caption,
}) {
  return Message(
    id: id ?? this.id,
    body: body ?? this.body,
    type: type ?? this.type,
    t: t ?? this.t,
    notifyName: notifyName ?? this.notifyName,
    from: from ?? this.from,
    to: to ?? this.to,
    self: self ?? this.self,
    isNewMsg: isNewMsg ?? this.isNewMsg,
    star: star ?? this.star,
    kicNotified: kicNotified ?? this.kicNotified,
    recvFresh: recvFresh ?? this.recvFresh,
    isFromTemplate: isFromTemplate ?? this.isFromTemplate,
    pollInvalidated: pollInvalidated ?? this.pollInvalidated,
    broadcast: broadcast ?? this.broadcast,
    isForwarded: isForwarded ?? this.isForwarded,
    hasReaction: hasReaction ?? this.hasReaction,
    ephemeralOutOfSync: ephemeralOutOfSync ?? this.ephemeralOutOfSync,
    productHeaderImageRejected:
        productHeaderImageRejected ?? this.productHeaderImageRejected,
    lastPlaybackProgress: lastPlaybackProgress ?? this.lastPlaybackProgress,
    isDynamicReplyButtonsMsg:
        isDynamicReplyButtonsMsg ?? this.isDynamicReplyButtonsMsg,
    isMdHistoryMsg: isMdHistoryMsg ?? this.isMdHistoryMsg,
    stickerSentTs: stickerSentTs ?? this.stickerSentTs,
    requiresDirectConnection:
        requiresDirectConnection ?? this.requiresDirectConnection,
    pttForwardedFeaturesEnabled:
        pttForwardedFeaturesEnabled ?? this.pttForwardedFeaturesEnabled,
    caption: caption ?? this.caption,
  );
}