copyWith method

Metadata copyWith({
  1. String? title,
  2. Duration? length,
  3. List<String>? artist,
  4. String? lyrics,
  5. String? artUrl,
  6. String? album,
  7. List<String>? albumArtist,
  8. int? discNumber,
  9. int? trackNumber,
  10. List<String>? genre,
})

Implementation

Metadata copyWith(
    {String? title,
    Duration? length,
    List<String>? artist,
    String? lyrics,
    String? artUrl,
    String? album,
    List<String>? albumArtist,
    int? discNumber,
    int? trackNumber,
    List<String>? genre}) {
  return Metadata(
    title: title ?? this.title,
    length: length ?? this.length,
    artist: artist ?? this.artist,
    lyrics: lyrics ?? this.lyrics,
    artUrl: artUrl ?? this.artUrl,
    album: album ?? this.album,
    albumArtist: albumArtist ?? this.albumArtist,
    discNumber: discNumber ?? this.discNumber,
    trackNumber: trackNumber ?? this.trackNumber,
    genre: genre ?? this.genre,
  );
}