toCompanion method

SongCompanion toCompanion(
  1. bool nullToAbsent
)

Implementation

SongCompanion toCompanion(bool nullToAbsent) {
  return SongCompanion(
    id: Value(id),
    name: Value(name),
    locked: Value(locked),
    published: Value(published),
    imagePath: imagePath == null && nullToAbsent
        ? const Value.absent()
        : Value(imagePath),
    description: description == null && nullToAbsent
        ? const Value.absent()
        : Value(description),
    note: note == null && nullToAbsent ? const Value.absent() : Value(note),
    youtubeCode: youtubeCode == null && nullToAbsent
        ? const Value.absent()
        : Value(youtubeCode),
    youtubeVideoInfo: youtubeVideoInfo == null && nullToAbsent
        ? const Value.absent()
        : Value(youtubeVideoInfo),
    albumId: Value(albumId),
  );
}