copyWith method
CourseTableSlot
copyWith({ - int? id,
- Value<String?> number = const Value.absent(),
- int? semester,
- Value<String?> nameZh = const Value.absent(),
- Value<String?> nameEn = const Value.absent(),
- Value<double?> credits = const Value.absent(),
- Value<int?> hours = const Value.absent(),
- DayOfWeek? dayOfWeek,
- Period? period,
- Value<String?> classroomNameZh = const Value.absent(),
- Value<String?> classroomNameEn = const Value.absent(),
})
Implementation
CourseTableSlot copyWith({
int? id,
Value<String?> number = const Value.absent(),
int? semester,
Value<String?> nameZh = const Value.absent(),
Value<String?> nameEn = const Value.absent(),
Value<double?> credits = const Value.absent(),
Value<int?> hours = const Value.absent(),
DayOfWeek? dayOfWeek,
Period? period,
Value<String?> classroomNameZh = const Value.absent(),
Value<String?> classroomNameEn = const Value.absent(),
}) => CourseTableSlot(
id: id ?? this.id,
number: number.present ? number.value : this.number,
semester: semester ?? this.semester,
nameZh: nameZh.present ? nameZh.value : this.nameZh,
nameEn: nameEn.present ? nameEn.value : this.nameEn,
credits: credits.present ? credits.value : this.credits,
hours: hours.present ? hours.value : this.hours,
dayOfWeek: dayOfWeek ?? this.dayOfWeek,
period: period ?? this.period,
classroomNameZh: classroomNameZh.present
? classroomNameZh.value
: this.classroomNameZh,
classroomNameEn: classroomNameEn.present
? classroomNameEn.value
: this.classroomNameEn,
);