copyWith method

Reaction copyWith({
  1. String? id,
  2. String? emoji,
  3. String? userId,
  4. String? userName,
  5. DateTime? createdAt,
})

Creates a copy with updated fields.

Implementation

Reaction copyWith({
  String? id,
  String? emoji,
  String? userId,
  String? userName,
  DateTime? createdAt,
}) {
  return Reaction(
    id: id ?? this.id,
    emoji: emoji ?? this.emoji,
    userId: userId ?? this.userId,
    userName: userName ?? this.userName,
    createdAt: createdAt ?? this.createdAt,
  );
}