copyWith method

MediaInfo copyWith({
  1. String? title,
  2. String? artist,
  3. String? album,
  4. String? status,
  5. String? playerName,
  6. int? position,
  7. int? length,
  8. String? artUrl,
})

Copy with method for updating specific fields

Implementation

MediaInfo copyWith({
  String? title,
  String? artist,
  String? album,
  String? status,
  String? playerName,
  int? position,
  int? length,
  String? artUrl,
}) {
  return MediaInfo(
    title: title ?? this.title,
    artist: artist ?? this.artist,
    album: album ?? this.album,
    status: status ?? this.status,
    playerName: playerName ?? this.playerName,
    position: position ?? this.position,
    length: length ?? this.length,
    artUrl: artUrl ?? this.artUrl,
  );
}