copyWith method

LessonData copyWith({
  1. int? id,
  2. String? title,
  3. String? titleInEnglish,
  4. int? seqNum,
  5. bool? locked,
  6. bool? published,
  7. Value<DateTime?> publishDate = const Value.absent(),
  8. Value<String?> imagePath = const Value.absent(),
  9. int? bookId,
  10. Value<String?> description = const Value.absent(),
  11. Value<String?> note = const Value.absent(),
})

Implementation

LessonData copyWith({
  int? id,
  String? title,
  String? titleInEnglish,
  int? seqNum,
  bool? locked,
  bool? published,
  Value<DateTime?> publishDate = const Value.absent(),
  Value<String?> imagePath = const Value.absent(),
  int? bookId,
  Value<String?> description = const Value.absent(),
  Value<String?> note = const Value.absent(),
}) => LessonData(
  id: id ?? this.id,
  title: title ?? this.title,
  titleInEnglish: titleInEnglish ?? this.titleInEnglish,
  seqNum: seqNum ?? this.seqNum,
  locked: locked ?? this.locked,
  published: published ?? this.published,
  publishDate: publishDate.present ? publishDate.value : this.publishDate,
  imagePath: imagePath.present ? imagePath.value : this.imagePath,
  bookId: bookId ?? this.bookId,
  description: description.present ? description.value : this.description,
  note: note.present ? note.value : this.note,
);