copyWith method

Suggestion copyWith({
  1. String? id,
  2. String? title,
  3. String? description,
  4. List<Comment>? comments,
  5. List<String>? images,
  6. List<SuggestionLabel>? labels,
  7. String? authorId,
  8. bool? isAnonymous,
  9. DateTime? creationTime,
  10. SuggestionStatus? status,
  11. Set<String>? votedUserIds,
  12. Set<String>? notifyUserIds,
})

Implementation

Suggestion copyWith({
  String? id,
  String? title,
  String? description,
  List<Comment>? comments,
  List<String>? images,
  List<SuggestionLabel>? labels,
  String? authorId,
  bool? isAnonymous,
  DateTime? creationTime,
  SuggestionStatus? status,
  Set<String>? votedUserIds,
  Set<String>? notifyUserIds,
}) {
  return Suggestion(
    id: id ?? this.id,
    title: title ?? this.title,
    description: description ?? this.description,
    images: images ?? this.images,
    labels: labels ?? this.labels,
    comments: comments ?? this.comments,
    authorId: authorId ?? this.authorId,
    isAnonymous: isAnonymous ?? this.isAnonymous,
    creationTime: creationTime ?? this.creationTime,
    status: status ?? this.status,
    votedUserIds: votedUserIds ?? this.votedUserIds,
    notifyUserIds: notifyUserIds ?? this.notifyUserIds,
  );
}