copyWith method

ClassesData copyWith({
  1. int? id,
  2. Value<DateTime?> fetchedAt = const Value.absent(),
  3. String? code,
  4. String? nameZh,
  5. Value<String?> nameEn = const Value.absent(),
})

Implementation

ClassesData copyWith({
  int? id,
  Value<DateTime?> fetchedAt = const Value.absent(),
  String? code,
  String? nameZh,
  Value<String?> nameEn = const Value.absent(),
}) => ClassesData(
  id: id ?? this.id,
  fetchedAt: fetchedAt.present ? fetchedAt.value : this.fetchedAt,
  code: code ?? this.code,
  nameZh: nameZh ?? this.nameZh,
  nameEn: nameEn.present ? nameEn.value : this.nameEn,
);