copyWith method

TaskExercise copyWith({
  1. int? id,
  2. String? name,
  3. TaskType? type,
  4. num? maxScore,
  5. String? startDate,
  6. String? deadline,
  7. String? timer,
  8. TaskExerciseActivity? activity,
  9. List<TaskExerciseQuestionOrder>? questionOrders,
  10. bool? areQuestionsShuffled,
  11. int? quizId,
  12. String? mode,
  13. String? viewContent,
  14. String? exerciseUrl,
  15. List<TaskAttachment>? attachments,
  16. ExerciseQuestionsSettings? settings,
})

Implementation

TaskExercise copyWith({
  int? id,
  String? name,
  enums.TaskType? type,
  num? maxScore,
  String? startDate,
  String? deadline,
  String? timer,
  TaskExerciseActivity? activity,
  List<TaskExerciseQuestionOrder>? questionOrders,
  bool? areQuestionsShuffled,
  int? quizId,
  String? mode,
  String? viewContent,
  String? exerciseUrl,
  List<TaskAttachment>? attachments,
  ExerciseQuestionsSettings? settings,
}) {
  return TaskExercise(
    id: id ?? this.id,
    name: name ?? this.name,
    type: type ?? this.type,
    maxScore: maxScore ?? this.maxScore,
    startDate: startDate ?? this.startDate,
    deadline: deadline ?? this.deadline,
    timer: timer ?? this.timer,
    activity: activity ?? this.activity,
    questionOrders: questionOrders ?? this.questionOrders,
    areQuestionsShuffled: areQuestionsShuffled ?? this.areQuestionsShuffled,
    quizId: quizId ?? this.quizId,
    mode: mode ?? this.mode,
    viewContent: viewContent ?? this.viewContent,
    exerciseUrl: exerciseUrl ?? this.exerciseUrl,
    attachments: attachments ?? this.attachments,
    settings: settings ?? this.settings,
  );
}