copyWith method

Comment copyWith({
  1. String? id,
  2. String? shaderId,
  3. String? userId,
  4. String? picture,
  5. DateTime? date,
  6. String? text,
  7. bool? hidden,
})

Builds a a copy of a Comment

id: The id of the comment shaderId: The id of the shader userId: The user id of user that posted the comment picture: The picture of the user who posted the comment date: The date the comment was posted text: The text of the comment hidden: If the current user comment is hidden

Implementation

Comment copyWith(
    {String? id,
    String? shaderId,
    String? userId,
    String? picture,
    DateTime? date,
    String? text,
    bool? hidden}) {
  return Comment(
      id: id ?? this.id,
      shaderId: shaderId ?? this.shaderId,
      userId: userId ?? this.userId,
      picture: picture ?? this.picture,
      date: date ?? this.date,
      text: text ?? this.text,
      hidden: hidden ?? this.hidden);
}