copyWith method

AddedReaction copyWith({
  1. ReactionType? type,
  2. MessageSender? senderId,
  3. bool? isOutgoing,
  4. int? date,
})

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

Implementation

AddedReaction copyWith({
  ReactionType? type,
  MessageSender? senderId,
  bool? isOutgoing,
  int? date,
}) =>
    AddedReaction(
      type: type ?? this.type,
      senderId: senderId ?? this.senderId,
      isOutgoing: isOutgoing ?? this.isOutgoing,
      date: date ?? this.date,
    );