copyWith method
GlobalPlayerState
copyWith({ - Scene? activeScene,
- VideoPlayerController? videoPlayerController,
- bool? isPlaying,
- bool? isFullScreen,
- bool? isInPipMode,
- String? streamMimeType,
- String? streamLabel,
- String? streamSource,
- int? startupLatencyMs,
- bool? prewarmAttempted,
- bool? prewarmSucceeded,
- int? prewarmLatencyMs,
- bool? autoplayNext,
- bool? showVideoDebugInfo,
- bool? useDoubleTapSeek,
- bool? enableBackgroundPlayback,
- bool? enableNativePip,
- bool clearActive = false,
})
Implementation
GlobalPlayerState copyWith({
Scene? activeScene,
VideoPlayerController? videoPlayerController,
bool? isPlaying,
bool? isFullScreen,
bool? isInPipMode,
String? streamMimeType,
String? streamLabel,
String? streamSource,
int? startupLatencyMs,
bool? prewarmAttempted,
bool? prewarmSucceeded,
int? prewarmLatencyMs,
bool? autoplayNext,
bool? showVideoDebugInfo,
bool? useDoubleTapSeek,
bool? enableBackgroundPlayback,
bool? enableNativePip,
bool clearActive = false,
}) {
return GlobalPlayerState(
activeScene: clearActive ? null : (activeScene ?? this.activeScene),
videoPlayerController: clearActive
? null
: (videoPlayerController ?? this.videoPlayerController),
isPlaying: isPlaying ?? this.isPlaying,
isFullScreen: isFullScreen ?? this.isFullScreen,
isInPipMode: isInPipMode ?? this.isInPipMode,
streamMimeType: clearActive
? null
: (streamMimeType ?? this.streamMimeType),
streamLabel: clearActive ? null : (streamLabel ?? this.streamLabel),
streamSource: clearActive ? null : (streamSource ?? this.streamSource),
startupLatencyMs: clearActive
? null
: (startupLatencyMs ?? this.startupLatencyMs),
prewarmAttempted: clearActive
? null
: (prewarmAttempted ?? this.prewarmAttempted),
prewarmSucceeded: clearActive
? null
: (prewarmSucceeded ?? this.prewarmSucceeded),
prewarmLatencyMs: clearActive
? null
: (prewarmLatencyMs ?? this.prewarmLatencyMs),
autoplayNext: autoplayNext ?? this.autoplayNext,
showVideoDebugInfo: showVideoDebugInfo ?? this.showVideoDebugInfo,
useDoubleTapSeek: useDoubleTapSeek ?? this.useDoubleTapSeek,
enableBackgroundPlayback:
enableBackgroundPlayback ?? this.enableBackgroundPlayback,
enableNativePip: enableNativePip ?? this.enableNativePip,
);
}