copyWith method
MessageReaction
copyWith({
- ReactionType? type,
- int? totalCount,
- bool? isChosen,
- MessageSender? usedSenderId()?,
- 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,
);