copyWith method

Reaction copyWith({
  1. String? id,
  2. String? kind,
  3. String? activityId,
  4. String? userId,
  5. String? parent,
  6. DateTime? createdAt,
  7. DateTime? updatedAt,
  8. List<FeedId>? targetFeeds,
  9. User? user,
  10. Map<String, Object>? targetFeedsExtraData,
  11. Map<String, Object>? data,
  12. Map<String, List<Reaction>>? latestChildren,
  13. Map<String, int>? childrenCounts,
  14. Map<String, List<Reaction>>? ownChildren,
})

Copies this Reaction to a new instance.

Implementation

Reaction copyWith(
        {String? id,
        String? kind,
        String? activityId,
        String? userId,
        String? parent,
        DateTime? createdAt,
        DateTime? updatedAt,
        List<FeedId>? targetFeeds,
        User? user,
        Map<String, Object>? targetFeedsExtraData,
        Map<String, Object>? data,
        Map<String, List<Reaction>>? latestChildren,
        Map<String, int>? childrenCounts,
        Map<String, List<Reaction>>? ownChildren}) =>
    Reaction(
      id: id ?? this.id,
      kind: kind ?? this.kind,
      activityId: activityId ?? this.activityId,
      userId: userId ?? this.userId,
      parent: parent ?? this.parent,
      createdAt: createdAt ?? this.createdAt,
      updatedAt: updatedAt ?? this.updatedAt,
      targetFeeds: targetFeeds ?? this.targetFeeds,
      user: user ?? this.user,
      targetFeedsExtraData: targetFeedsExtraData ?? this.targetFeedsExtraData,
      data: data ?? this.data,
      latestChildren: latestChildren ?? this.latestChildren,
      childrenCounts: childrenCounts ?? this.childrenCounts,
      ownChildren: ownChildren ?? this.ownChildren,
    );