copyWith method
CourseOffering
copyWith({ - int? id,
- Value<DateTime?> fetchedAt = const Value.absent(),
- int? course,
- int? semester,
- String? number,
- int? phase,
- CourseType? courseType,
- Value<String?> status = const Value.absent(),
- Value<String?> language = const Value.absent(),
- Value<int?> enrolled = const Value.absent(),
- Value<int?> withdrawn = const Value.absent(),
- Value<String?> syllabusId = const Value.absent(),
- Value<DateTime?> syllabusUpdatedAt = const Value.absent(),
- Value<String?> objective = const Value.absent(),
- Value<String?> weeklyPlan = const Value.absent(),
- Value<String?> evaluation = const Value.absent(),
- Value<String?> textbooks = const Value.absent(),
})
Implementation
CourseOffering copyWith({
int? id,
Value<DateTime?> fetchedAt = const Value.absent(),
int? course,
int? semester,
String? number,
int? phase,
CourseType? courseType,
Value<String?> status = const Value.absent(),
Value<String?> language = const Value.absent(),
Value<String?> remarks = const Value.absent(),
Value<int?> enrolled = const Value.absent(),
Value<int?> withdrawn = const Value.absent(),
Value<String?> syllabusId = const Value.absent(),
Value<DateTime?> syllabusUpdatedAt = const Value.absent(),
Value<String?> objective = const Value.absent(),
Value<String?> weeklyPlan = const Value.absent(),
Value<String?> evaluation = const Value.absent(),
Value<String?> textbooks = const Value.absent(),
}) => CourseOffering(
id: id ?? this.id,
fetchedAt: fetchedAt.present ? fetchedAt.value : this.fetchedAt,
course: course ?? this.course,
semester: semester ?? this.semester,
number: number ?? this.number,
phase: phase ?? this.phase,
courseType: courseType ?? this.courseType,
status: status.present ? status.value : this.status,
language: language.present ? language.value : this.language,
remarks: remarks.present ? remarks.value : this.remarks,
enrolled: enrolled.present ? enrolled.value : this.enrolled,
withdrawn: withdrawn.present ? withdrawn.value : this.withdrawn,
syllabusId: syllabusId.present ? syllabusId.value : this.syllabusId,
syllabusUpdatedAt: syllabusUpdatedAt.present
? syllabusUpdatedAt.value
: this.syllabusUpdatedAt,
objective: objective.present ? objective.value : this.objective,
weeklyPlan: weeklyPlan.present ? weeklyPlan.value : this.weeklyPlan,
evaluation: evaluation.present ? evaluation.value : this.evaluation,
textbooks: textbooks.present ? textbooks.value : this.textbooks,
);