copyWith method

Comment copyWith({
  1. String? uuid,
  2. String? content,
  3. CommentType? type,
  4. String? userUUID,
  5. String? parentUUID,
  6. DateTime? createdAt,
  7. DateTime? updatedAt,
  8. bool? isHidden,
  9. String? replyCommentUUID,
})

Implementation

Comment copyWith({
  String? uuid,
  String? content,
  CommentType? type,
  String? userUUID,
  String? parentUUID,
  DateTime? createdAt,
  DateTime? updatedAt,
  bool? isHidden,
  String? replyCommentUUID,
}) {
  return Comment(
    uuid: uuid ?? this.uuid,
    content: content ?? this.content,
    type: type ?? this.type,
    userUUID: userUUID ?? this.userUUID,
    parentUUID: parentUUID ?? this.parentUUID,
    createdAt: createdAt ?? this.createdAt,
    updatedAt: updatedAt ?? this.updatedAt,
    isHidden: isHidden ?? this.isHidden,
    replyCommentUUID: replyCommentUUID ?? this.replyCommentUUID,
  );
}