PlayerUIVisibilityOptions class

Configuration options to control the visibility of various UI components in the video player interface.

Use these options to customize which parts of the player UI are shown or hidden, enabling a tailored user experience.

Annotations

Constructors

PlayerUIVisibilityOptions({bool showSeekBar = true, bool showCurrentTime = true, bool showDurationTime = true, bool showRemainingTime = true, bool showLiveIndicator = true, bool showLoadingWidget = true, bool showErrorPlaceholder = true, bool showReplayButton = true, bool showThumbnailAtStart = true, bool showVideoBottomControlsBar = true, bool showBottomControlsBarOnEndedFullscreen = true, bool alwaysShowBottomControlsBar = false, bool showBottomControlsBarOnPause = false, bool showFullScreenButton = true, bool showMuteUnMuteButton = true, bool showPlayPauseReplayButton = true, bool useSafeAreaForBottomControls = false, bool showGradientBottomControl = true, bool enableForwardGesture = true, bool enableBackwardGesture = true, bool enableExitFullscreenOnVerticalSwipe = true, bool showSwitchVideoQuality = true, bool showSwitchWhenOnlyAuto = true, bool showPlaybackSpeedButton = false, bool enableOrientationLock = true, Duration controlsPersistenceDuration = const Duration(seconds: 3), double? customAspectRatioNormal, double? customAspectRatioFullScreen, Orientation? fullscreenOrientation})
Creates a new instance of PlayerUIVisibilityOptions.
const

Properties

alwaysShowBottomControlsBar bool
Whether to always show the bottom control bar, even when the video is paused or hasn't started yet.
final
controlsPersistenceDuration Duration
Duration the controls remain visible after interaction while video is playing.
final
customAspectRatioFullScreen double?
Optional custom aspect ratio for fullscreen mode.
final
customAspectRatioNormal double?
Optional custom aspect ratio for normal (non-fullscreen) mode.
final
enableBackwardGesture bool
Whether to allow gesture-based rewind.
final
enableExitFullscreenOnVerticalSwipe bool
Whether to allow exiting fullscreen via a vertical swipe down.
final
enableForwardGesture bool
Whether to allow gesture-based fast-forward.
final
enableOrientationLock bool
Whether to lock device orientation to the video orientation in fullscreen.
final
fullscreenOrientation Orientation?
Optional orientation to use in fullscreen mode.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showBottomControlsBarOnEndedFullscreen bool
Whether to display the bottom control bar in fullscreen after the video has ended.
final
showBottomControlsBarOnPause bool
Whether to display the bottom control bar when the video is paused.
final
showCurrentTime bool
Whether to show the current playback time.
final
showDurationTime bool
Whether to show the total video duration.
final
showErrorPlaceholder bool
Whether to display an error placeholder widget if playback fails.
final
showFullScreenButton bool
Whether to show the fullscreen toggle button.
final
showGradientBottomControl bool
Whether to display a gradient overlay behind the bottom control bar.
final
showLiveIndicator bool
Whether to show a live indicator when the video is a livestream.
final
showLoadingWidget bool
Whether to show the loading widget during buffering.
final
showMuteUnMuteButton bool
Whether to show the mute/unmute toggle button.
final
showPlaybackSpeedButton bool
Whether to show the playback speed button in the UI.
final
showPlayPauseReplayButton bool
Whether to show the main play/pause/replay button overlay (typically centered on the video). This only applies when the video is not in full screen.
final
showRemainingTime bool
Whether to show the remaining playback time.
final
showReplayButton bool
Whether to show the replay button after the video ends.
final
showSeekBar bool
Whether to display the seek bar.
final
showSwitchVideoQuality bool
Whether to show the quality switch button.
final
showSwitchWhenOnlyAuto bool
Whether to show the switch quality button when only 'Auto' is available.
final
showThumbnailAtStart bool
Whether to show the thumbnail image before playback starts.
final
showVideoBottomControlsBar bool
Whether to display the bottom control bar.
final
useSafeAreaForBottomControls bool
Whether to wrap the bottom control bar inside a SafeArea widget to avoid overlaps with system UI elements like gesture bars or notches.
final

Methods

copyWith({bool? showSeekBar, bool? showCurrentTime, bool? showDurationTime, bool? showRemainingTime, bool? showLiveIndicator, bool? showLoadingWidget, bool? showErrorPlaceholder, bool? showReplayButton, bool? showThumbnailAtStart, bool? showVideoBottomControlsBar, bool? showBottomControlsBarOnEndedFullscreen, bool? alwaysShowBottomControlsBar, bool? showBottomControlsBarOnPause, bool? showFullScreenButton, bool? showMuteUnMuteButton, bool? showPlayPauseReplayButton, bool? useSafeAreaForBottomControls, bool? showGradientBottomControl, bool? enableForwardGesture, bool? enableBackwardGesture, bool? enableExitFullscreenOnVerticalSwipe, bool? showSwitchVideoQuality, bool? showSwitchWhenOnlyAuto, bool? showPlaybackSpeedButton, bool? enableOrientationLock, Duration? controlsPersistenceDuration, double? customAspectRatioNormal, double? customAspectRatioFullScreen, Orientation? fullscreenOrientation}) PlayerUIVisibilityOptions
Returns a copy of this PlayerUIVisibilityOptions with the given fields replaced by the new values.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited