copyWith method
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(),
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,
);