copyWith method

Syllabus copyWith({
  1. int? id,
  2. int? courseOffering,
  3. int? teacher,
  4. Value<DateTime?> updatedAt = const Value.absent(),
  5. Value<String?> objective = const Value.absent(),
  6. Value<String?> weeklyPlan = const Value.absent(),
  7. Value<String?> evaluation = const Value.absent(),
  8. Value<String?> textbooks = const Value.absent(),
  9. Value<String?> remarks = const Value.absent(),
})

Implementation

Syllabus copyWith({
  int? id,
  int? courseOffering,
  int? teacher,
  Value<DateTime?> updatedAt = 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(),
  Value<String?> remarks = const Value.absent(),
}) => Syllabus(
  id: id ?? this.id,
  courseOffering: courseOffering ?? this.courseOffering,
  teacher: teacher ?? this.teacher,
  updatedAt: updatedAt.present ? updatedAt.value : this.updatedAt,
  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,
  remarks: remarks.present ? remarks.value : this.remarks,
);