copyWith method

TeacherSemester copyWith({
  1. int? id,
  2. Value<DateTime?> fetchedAt = const Value.absent(),
  3. int? teacher,
  4. int? semester,
  5. Value<String?> email = const Value.absent(),
  6. Value<int?> department = const Value.absent(),
  7. Value<String?> title = const Value.absent(),
  8. Value<double?> teachingHours = const Value.absent(),
  9. Value<String?> officeHoursNote = const Value.absent(),
})

Implementation

TeacherSemester copyWith({
  int? id,
  Value<DateTime?> fetchedAt = const Value.absent(),
  int? teacher,
  int? semester,
  Value<String?> email = const Value.absent(),
  Value<int?> department = const Value.absent(),
  Value<String?> title = const Value.absent(),
  Value<double?> teachingHours = const Value.absent(),
  Value<String?> officeHoursNote = const Value.absent(),
}) => TeacherSemester(
  id: id ?? this.id,
  fetchedAt: fetchedAt.present ? fetchedAt.value : this.fetchedAt,
  teacher: teacher ?? this.teacher,
  semester: semester ?? this.semester,
  email: email.present ? email.value : this.email,
  department: department.present ? department.value : this.department,
  title: title.present ? title.value : this.title,
  teachingHours: teachingHours.present
      ? teachingHours.value
      : this.teachingHours,
  officeHoursNote: officeHoursNote.present
      ? officeHoursNote.value
      : this.officeHoursNote,
);