copyWith method
PlayerState
copyWith({
- Playlist? playlist,
- bool? playing,
- bool? completed,
- Duration? position,
- Duration? duration,
- double? volume,
- double? rate,
- double? pitch,
- bool? buffering,
- Duration? buffer,
- PlaylistMode? playlistMode,
- AudioParams? audioParams,
- VideoParams? videoParams,
- double? audioBitrate,
- AudioDevice? audioDevice,
- List<
AudioDevice> ? audioDevices, - Track? track,
- Tracks? tracks,
- int? width,
- int? height,
- List<
String> ? subtitle,
Implementation
PlayerState copyWith({
Playlist? playlist,
bool? playing,
bool? completed,
Duration? position,
Duration? duration,
double? volume,
double? rate,
double? pitch,
bool? buffering,
Duration? buffer,
PlaylistMode? playlistMode,
AudioParams? audioParams,
VideoParams? videoParams,
double? audioBitrate,
AudioDevice? audioDevice,
List<AudioDevice>? audioDevices,
Track? track,
Tracks? tracks,
int? width,
int? height,
List<String>? subtitle,
}) {
return PlayerState(
playlist: playlist ?? this.playlist,
playing: playing ?? this.playing,
completed: completed ?? this.completed,
position: position ?? this.position,
duration: duration ?? this.duration,
volume: volume ?? this.volume,
rate: rate ?? this.rate,
pitch: pitch ?? this.pitch,
buffering: buffering ?? this.buffering,
buffer: buffer ?? this.buffer,
playlistMode: playlistMode ?? this.playlistMode,
audioParams: audioParams ?? this.audioParams,
videoParams: videoParams ?? this.videoParams,
audioBitrate: audioBitrate ?? this.audioBitrate,
audioDevice: audioDevice ?? this.audioDevice,
audioDevices: audioDevices ?? this.audioDevices,
track: track ?? this.track,
tracks: tracks ?? this.tracks,
width: width ?? this.width,
height: height ?? this.height,
subtitle: subtitle ?? this.subtitle,
);
}