copyWith method
Returns a copy with the given fields replaced. For a nullable
field pass a function, e.g. field: () => null to clear it.
Implementation
Audio copyWith({
int? duration,
String? title,
String? performer,
String? fileName,
String? mimeType,
Minithumbnail? Function()? albumCoverMinithumbnail,
Thumbnail? Function()? albumCoverThumbnail,
List<Thumbnail>? externalAlbumCovers,
File? audio,
}) =>
Audio(
duration: duration ?? this.duration,
title: title ?? this.title,
performer: performer ?? this.performer,
fileName: fileName ?? this.fileName,
mimeType: mimeType ?? this.mimeType,
albumCoverMinithumbnail: albumCoverMinithumbnail != null
? albumCoverMinithumbnail()
: this.albumCoverMinithumbnail,
albumCoverThumbnail: albumCoverThumbnail != null
? albumCoverThumbnail()
: this.albumCoverThumbnail,
externalAlbumCovers: externalAlbumCovers ?? this.externalAlbumCovers,
audio: audio ?? this.audio,
);