copyWith method

CourseTableSlot copyWith({
  1. int? id,
  2. String? number,
  3. Value<String?> nameZh = const Value.absent(),
  4. Value<String?> nameEn = const Value.absent(),
  5. double? credits,
  6. int? hours,
  7. DayOfWeek? dayOfWeek,
  8. Period? period,
  9. Value<String?> nameZh1 = const Value.absent(),
})

Implementation

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