copyWith method

TaskCommentsModel copyWith({
  1. String? id,
  2. String? comment,
  3. String? userId,
  4. String? profilePic,
  5. String? userName,
  6. Timestamp? createdAt,
  7. Timestamp? deletedAt,
  8. String? taskId,
  9. String? attachmentLink,
  10. String? fileExtension,
  11. String? fileName,
  12. String? thumbnailPath,
})

Implementation

TaskCommentsModel copyWith({  String? id,
  String? comment,
  String? userId,
  String? profilePic,
  String? userName,
  Timestamp? createdAt,
  Timestamp? deletedAt,
  String? taskId,
  String? attachmentLink,
  String? fileExtension,
  String? fileName,
  String? thumbnailPath,
}) => TaskCommentsModel(  id: id ?? _id,
  comment: comment ?? _comment,
  userId: userId ?? _userId,
  profilePic: profilePic ?? _profilePic,
  userName: userName ?? _userName,
  createdAt: createdAt ?? _createdAt,
  deletedAt: deletedAt ?? _deletedAt,
  taskId: taskId ?? _taskId,
  attachmentLink: attachmentLink ?? _attachmentLink,
  fileExtension: fileExtension ?? _fileExtension,
  fileName: fileName ?? _fileName,
  thumbnailPath: thumbnailPath ?? _thumbnailPath,
);