copyWith method
TaskExercise
copyWith({
- int? id,
- String? name,
- 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,
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,
);
}