copyWith method

MessageReaction copyWith({
  1. ReactionType? type,
  2. int? totalCount,
  3. bool? isChosen,
  4. MessageSender? usedSenderId()?,
  5. List<MessageSender>? recentSenderIds,
})

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

Implementation

MessageReaction copyWith({
  ReactionType? type,
  int? totalCount,
  bool? isChosen,
  MessageSender? Function()? usedSenderId,
  List<MessageSender>? recentSenderIds,
}) =>
    MessageReaction(
      type: type ?? this.type,
      totalCount: totalCount ?? this.totalCount,
      isChosen: isChosen ?? this.isChosen,
      usedSenderId: usedSenderId != null ? usedSenderId() : this.usedSenderId,
      recentSenderIds: recentSenderIds ?? this.recentSenderIds,
    );