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