copyWith method

PlayerState copyWith({
  1. Playlist? playlist,
  2. bool? playing,
  3. bool? completed,
  4. Duration? position,
  5. Duration? duration,
  6. double? volume,
  7. double? rate,
  8. double? pitch,
  9. bool? buffering,
  10. Duration? buffer,
  11. PlaylistMode? playlistMode,
  12. AudioParams? audioParams,
  13. VideoParams? videoParams,
  14. double? audioBitrate,
  15. AudioDevice? audioDevice,
  16. List<AudioDevice>? audioDevices,
  17. Track? track,
  18. Tracks? tracks,
  19. int? width,
  20. int? height,
  21. 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,
  );
}