copyWith method

YoutubePlayerValue copyWith(
  1. {bool? isReady,
  2. bool? isControlsVisible,
  3. bool? isLoaded,
  4. bool? hasPlayed,
  5. Duration? position,
  6. double? buffered,
  7. bool? isPlaying,
  8. bool? isFullScreen,
  9. int? volume,
  10. PlayerState? playerState,
  11. double? playbackRate,
  12. String? playbackQuality,
  13. int? errorCode,
  14. InAppWebViewController? webViewController,
  15. bool? isDragging,
  16. YoutubeMetaData? metaData}
)

Creates new YoutubePlayerValue with assigned parameters and overrides the old one.

Implementation

YoutubePlayerValue copyWith({
  bool? isReady,
  bool? isControlsVisible,
  bool? isLoaded,
  bool? hasPlayed,
  Duration? position,
  double? buffered,
  bool? isPlaying,
  bool? isFullScreen,
  int? volume,
  PlayerState? playerState,
  double? playbackRate,
  String? playbackQuality,
  int? errorCode,
  InAppWebViewController? webViewController,
  bool? isDragging,
  YoutubeMetaData? metaData,
}) {
  return YoutubePlayerValue(
    isReady: isReady ?? this.isReady,
    isControlsVisible: isControlsVisible ?? this.isControlsVisible,
    hasPlayed: hasPlayed ?? this.hasPlayed,
    position: position ?? this.position,
    buffered: buffered ?? this.buffered,
    isPlaying: isPlaying ?? this.isPlaying,
    isFullScreen: isFullScreen ?? this.isFullScreen,
    volume: volume ?? this.volume,
    playerState: playerState ?? this.playerState,
    playbackRate: playbackRate ?? this.playbackRate,
    playbackQuality: playbackQuality ?? this.playbackQuality,
    errorCode: errorCode ?? this.errorCode,
    webViewController: webViewController ?? this.webViewController,
    isDragging: isDragging ?? this.isDragging,
    metaData: metaData ?? this.metaData,
  );
}