copyWith method

Reaction copyWith({
  1. String? messageId,
  2. DateTime? createdAt,
  3. String? type,
  4. User? user,
  5. String? userId,
  6. int? score,
  7. Map<String, Object?>? extraData,
})

Creates a copy of Reaction with specified attributes overridden.

Implementation

Reaction copyWith({
  String? messageId,
  DateTime? createdAt,
  String? type,
  User? user,
  String? userId,
  int? score,
  Map<String, Object?>? extraData,
}) =>
    Reaction(
      messageId: messageId ?? this.messageId,
      createdAt: createdAt ?? this.createdAt,
      type: type ?? this.type,
      user: user ?? this.user,
      userId: userId ?? this.userId,
      score: score ?? this.score,
      extraData: extraData ?? this.extraData,
    );