copyWith method

MessageInteractionInfo copyWith({
  1. int? viewCount,
  2. int? forwardCount,
  3. MessageReplyInfo? replyInfo()?,
  4. MessageReactions? reactions()?,
})

Returns a copy with the given fields replaced. For a nullable field pass a function, e.g. field: () => null to clear it.

Implementation

MessageInteractionInfo copyWith({
  int? viewCount,
  int? forwardCount,
  MessageReplyInfo? Function()? replyInfo,
  MessageReactions? Function()? reactions,
}) =>
    MessageInteractionInfo(
      viewCount: viewCount ?? this.viewCount,
      forwardCount: forwardCount ?? this.forwardCount,
      replyInfo: replyInfo != null ? replyInfo() : this.replyInfo,
      reactions: reactions != null ? reactions() : this.reactions,
    );