toCompanion method

LessonCompanion toCompanion(
  1. bool nullToAbsent
)

Implementation

LessonCompanion toCompanion(bool nullToAbsent) {
  return LessonCompanion(
    id: Value(id),
    title: Value(title),
    titleInEnglish: Value(titleInEnglish),
    seqNum: Value(seqNum),
    locked: Value(locked),
    published: Value(published),
    publishDate: publishDate == null && nullToAbsent
        ? const Value.absent()
        : Value(publishDate),
    imagePath: imagePath == null && nullToAbsent
        ? const Value.absent()
        : Value(imagePath),
    bookId: Value(bookId),
    description: description == null && nullToAbsent
        ? const Value.absent()
        : Value(description),
    note: note == null && nullToAbsent ? const Value.absent() : Value(note),
  );
}