markFeedbackAsRead method

Future<void> markFeedbackAsRead(
  1. Feedback feedback,
  2. {String? comment}
)

Marks the given feedback as read.

You can optionally provide a comment to add to the feedback.

It is safe to call this method multiple times on the same feedback to update the comment.

Implementation

Future<void> markFeedbackAsRead(Feedback feedback, {String? comment}) async {
  state = AsyncLoading();

  await _feedbackRepository.updateFeedback(
    feedback.copyWith(
      readAsInt: 1,
      comment: comment ?? "",
    ),
  );
}