copyWith method
Creates a copy of this PlaybackState with the given fields replaced
Implementation
PlaybackState copyWith({
ProcessingState? processingState,
bool? playing,
String? title,
int? position,
int? duration,
int? timestamp,
double? speed,
double? volume,
String? artist,
String? album,
String? url,
String? artUri,
String? genre,
int? trackNumber,
int? trackCount,
int? year,
}) {
return PlaybackState(
processingState: processingState ?? this.processingState,
playing: playing ?? this.playing,
title: title ?? this.title,
position: position ?? this.position,
duration: duration ?? this.duration,
timestamp: timestamp ?? this.timestamp,
speed: speed ?? this.speed,
volume: volume ?? this.volume,
artist: artist ?? this.artist,
album: album ?? this.album,
url: url ?? this.url,
artUri: artUri ?? this.artUri,
genre: genre ?? this.genre,
trackNumber: trackNumber ?? this.trackNumber,
trackCount: trackCount ?? this.trackCount,
year: year ?? this.year,
);
}