copyWith method

PaidReactor copyWith({
  1. MessageSender? senderId()?,
  2. int? starCount,
  3. bool? isTop,
  4. bool? isMe,
  5. bool? isAnonymous,
})

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

Implementation

PaidReactor copyWith({
  MessageSender? Function()? senderId,
  int? starCount,
  bool? isTop,
  bool? isMe,
  bool? isAnonymous,
}) => PaidReactor(
  senderId: senderId != null ? senderId() : this.senderId,
  starCount: starCount ?? this.starCount,
  isTop: isTop ?? this.isTop,
  isMe: isMe ?? this.isMe,
  isAnonymous: isAnonymous ?? this.isAnonymous,
);