copyWith method

UserAcademicSummary copyWith({
  1. int? id,
  2. int? user,
  3. int? semester,
  4. int? year,
  5. int? term,
  6. Value<double?> average = const Value.absent(),
  7. Value<double?> conduct = const Value.absent(),
  8. Value<double?> totalCredits = const Value.absent(),
  9. Value<double?> creditsPassed = const Value.absent(),
  10. Value<String?> note = const Value.absent(),
  11. Value<double?> gpa = const Value.absent(),
})

Implementation

UserAcademicSummary copyWith({
  int? id,
  int? user,
  int? semester,
  int? year,
  int? term,
  Value<double?> average = const Value.absent(),
  Value<double?> conduct = const Value.absent(),
  Value<double?> totalCredits = const Value.absent(),
  Value<double?> creditsPassed = const Value.absent(),
  Value<String?> note = const Value.absent(),
  Value<double?> gpa = const Value.absent(),
}) => UserAcademicSummary(
  id: id ?? this.id,
  user: user ?? this.user,
  semester: semester ?? this.semester,
  year: year ?? this.year,
  term: term ?? this.term,
  average: average.present ? average.value : this.average,
  conduct: conduct.present ? conduct.value : this.conduct,
  totalCredits: totalCredits.present ? totalCredits.value : this.totalCredits,
  creditsPassed: creditsPassed.present
      ? creditsPassed.value
      : this.creditsPassed,
  note: note.present ? note.value : this.note,
  gpa: gpa.present ? gpa.value : this.gpa,
);