copyWith method

Playlist copyWith({
  1. String? id,
  2. String? title,
  3. String? subtitle,
  4. String? description,
  5. String? permaURL,
  6. String? image,
  7. int? totalSongs,
  8. int? followers,
  9. List<Song>? songs,
  10. List<Artist>? artist,
})

Implementation

Playlist copyWith({
  String? id,
  String? title,
  String? subtitle,
  String? description,
  String? permaURL,
  String? image,
  int? totalSongs,
  int? followers,
  List<Song>? songs,
  List<Artist>? artist,
}) {
  return Playlist(
    id: id ?? this.id,
    title: title ?? this.title,
    subtitle: subtitle ?? this.subtitle,
    description: description ?? this.description,
    permaURL: permaURL ?? this.permaURL,
    image: image ?? this.image,
    totalSongs: totalSongs ?? this.totalSongs,
    followers: followers ?? this.followers,
    songs: songs ?? this.songs,
    artist: artist ?? this.artist,
  );
}