copyWith method

SongData copyWith({
  1. int? id,
  2. String? name,
  3. bool? locked,
  4. bool? published,
  5. Value<String?> imagePath = const Value.absent(),
  6. Value<String?> description = const Value.absent(),
  7. Value<String?> note = const Value.absent(),
  8. Value<String?> youtubeCode = const Value.absent(),
  9. Value<String?> youtubeVideoInfo = const Value.absent(),
  10. int? albumId,
})

Implementation

SongData copyWith({
  int? id,
  String? name,
  bool? locked,
  bool? published,
  Value<String?> imagePath = const Value.absent(),
  Value<String?> description = const Value.absent(),
  Value<String?> note = const Value.absent(),
  Value<String?> youtubeCode = const Value.absent(),
  Value<String?> youtubeVideoInfo = const Value.absent(),
  int? albumId,
}) => SongData(
  id: id ?? this.id,
  name: name ?? this.name,
  locked: locked ?? this.locked,
  published: published ?? this.published,
  imagePath: imagePath.present ? imagePath.value : this.imagePath,
  description: description.present ? description.value : this.description,
  note: note.present ? note.value : this.note,
  youtubeCode: youtubeCode.present ? youtubeCode.value : this.youtubeCode,
  youtubeVideoInfo: youtubeVideoInfo.present
      ? youtubeVideoInfo.value
      : this.youtubeVideoInfo,
  albumId: albumId ?? this.albumId,
);