copyWith method
Implementation
Course copyWith({
int? id,
Value<DateTime?> fetchedAt = const Value.absent(),
String? code,
double? credits,
int? hours,
String? nameZh,
Value<String?> nameEn = const Value.absent(),
Value<String?> descriptionZh = const Value.absent(),
Value<String?> descriptionEn = const Value.absent(),
}) => Course(
id: id ?? this.id,
fetchedAt: fetchedAt.present ? fetchedAt.value : this.fetchedAt,
code: code ?? this.code,
credits: credits ?? this.credits,
hours: hours ?? this.hours,
nameZh: nameZh ?? this.nameZh,
nameEn: nameEn.present ? nameEn.value : this.nameEn,
descriptionZh: descriptionZh.present
? descriptionZh.value
: this.descriptionZh,
descriptionEn: descriptionEn.present
? descriptionEn.value
: this.descriptionEn,
);