Exam constructor

const Exam({
  1. required String id,
  2. required String name,
  3. required DateTime start,
  4. required DateTime end,
  5. @Default('') String description,
  6. required Object content,
  7. required Certificate certificate,
  8. @Default(ExamStatus.preparing) ExamStatus status,
  9. @Default(QuizStatus.unfinished) QuizStatus statusValidation,
  10. required List<DateTime> statusChanges,
})

Implementation

const factory Exam({
  required String id,
  required String name,
  required DateTime start,
  required DateTime end,
  @Default('') String description,
  required Object content,
  required Certificate certificate,
  @Default(ExamStatus.preparing) ExamStatus status,
  @Default(QuizStatus.unfinished) QuizStatus statusValidation,
  required List<DateTime> statusChanges,
}) = _Exam;