BetterPlayerControlsConfiguration class
UI configuration of Better Player. Allows to change colors/icons/behavior of controls. Used in BetterPlayerConfiguration. Configuration applies only for player displayed in app, not in notification or PiP mode.
Constructors
-
BetterPlayerControlsConfiguration({Color controlBarColor = Colors.black87, Color textColor = Colors.white, Color iconsColor = Colors.white, IconData playIcon = Icons.play_arrow_outlined, IconData pauseIcon = Icons.pause_outlined, IconData muteIcon = Icons.volume_up_outlined, IconData unMuteIcon = Icons.volume_off_outlined, IconData fullscreenEnableIcon = Icons.fullscreen_outlined, IconData fullscreenDisableIcon = Icons.fullscreen_exit_outlined, IconData skipBackIcon = Icons.replay_10_outlined, IconData skipForwardIcon = Icons.forward_10_outlined, bool enableFullscreen = true, bool enableMute = true, bool enableProgressText = true, bool enableProgressBar = true, bool enableProgressBarDrag = true, bool enablePlayPause = true, bool enableSkips = true, bool enableAudioTracks = true, Color progressBarPlayedColor = Colors.white, Color progressBarHandleColor = Colors.white, Color progressBarBufferedColor = Colors.white70, Color progressBarBackgroundColor = Colors.white60, Duration controlsHideTime = const Duration(milliseconds: 300), Widget customControlsBuilder(BetterPlayerController controller, dynamic onPlayerVisibilityChanged(bool))?, BetterPlayerTheme? playerTheme, bool showControls = true, bool showControlsOnInitialize = true, double controlBarHeight = 48.0, Color liveTextColor = Colors.red, bool enableOverflowMenu = true, bool enablePlaybackSpeed = true, bool enableSubtitles = true, bool enableQualities = true, bool enablePip = true, bool enableRetry = true, List<
BetterPlayerOverflowMenuItem> overflowMenuCustomItems = const [], IconData overflowMenuIcon = Icons.more_vert_outlined, IconData pipMenuIcon = Icons.picture_in_picture_outlined, IconData playbackSpeedIcon = Icons.shutter_speed_outlined, IconData qualitiesIcon = Icons.hd_outlined, IconData subtitlesIcon = Icons.closed_caption_outlined, IconData audioTracksIcon = Icons.audiotrack_outlined, Color overflowMenuIconsColor = Colors.black, int forwardSkipTimeInMilliseconds = 10000, int backwardSkipTimeInMilliseconds = 10000, Color loadingColor = Colors.white, Widget? loadingWidget, Color backgroundColor = Colors.black, Color overflowModalColor = Colors.white, Color overflowModalTextColor = Colors.black}) -
const
- BetterPlayerControlsConfiguration.cupertino()
-
factory
- BetterPlayerControlsConfiguration.theme(ThemeData theme)
-
Setup BetterPlayerControlsConfiguration based on Theme options.
factory
- BetterPlayerControlsConfiguration.white()
-
factory
Properties
- audioTracksIcon → IconData
-
Icon of the audios menu item from overflow menu
final
- backgroundColor → Color
-
Color of the background, when no frame is displayed.
final
- backwardSkipTimeInMilliseconds → int
-
Time which will be used once user uses backward
final
- controlBarColor → Color
-
Color of the control bars
final
- controlBarHeight → double
-
Control bar height
final
- controlsHideTime → Duration
-
Time to hide controls
final
- customControlsBuilder → Widget Function(BetterPlayerController controller, dynamic onPlayerVisibilityChanged(bool))?
-
Parameter used to build custom controls
final
- enableAudioTracks → bool
-
Flag used to show/hide audio tracks
final
- enableFullscreen → bool
-
Flag used to enable/disable fullscreen
final
- enableMute → bool
-
Flag used to enable/disable mute
final
- enableOverflowMenu → bool
-
Flag used to show/hide overflow menu which contains playback, subtitles,
qualities options.
final
- enablePip → bool
-
Flag used to show/hide PiP mode
final
- enablePlaybackSpeed → bool
-
Flag used to show/hide playback speed
final
- enablePlayPause → bool
-
Flag used to enable/disable play-pause
final
- enableProgressBar → bool
-
Flag used to enable/disable progress bar
final
- enableProgressBarDrag → bool
-
Flag used to enable/disable progress bar drag
final
- enableProgressText → bool
-
Flag used to enable/disable progress texts
final
- enableQualities → bool
-
Flag used to show/hide qualities
final
- enableRetry → bool
-
Flag used to enable/disable retry feature
final
- enableSkips → bool
-
Flag used to enable skip forward and skip back
final
- enableSubtitles → bool
-
Flag used to show/hide subtitles
final
- forwardSkipTimeInMilliseconds → int
-
Time which will be used once user uses forward
final
- fullscreenDisableIcon → IconData
-
Icon of fullscreen mode disable
final
- fullscreenEnableIcon → IconData
-
Icon of fullscreen mode enable
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- iconsColor → Color
-
Color of icons
final
- liveTextColor → Color
-
Live text color;
final
- loadingColor → Color
-
Color of default loading indicator
final
- loadingWidget → Widget?
-
Widget which can be used instead of default progress
final
- muteIcon → IconData
-
Icon of mute
final
-
overflowMenuCustomItems
→ List<
BetterPlayerOverflowMenuItem> -
Custom items of overflow menu
final
- overflowMenuIcon → IconData
-
Icon of the overflow menu
final
- overflowMenuIconsColor → Color
-
Color of overflow menu icons
final
- overflowModalColor → Color
-
Color of the bottom modal sheet used for overflow menu items.
final
- overflowModalTextColor → Color
-
Color of text in bottom modal sheet used for overflow menu items.
final
- pauseIcon → IconData
-
Icon of pause
final
- pipMenuIcon → IconData
-
Icon of the PiP menu
final
- playbackSpeedIcon → IconData
-
Icon of the playback speed menu item from overflow menu
final
- playerTheme → BetterPlayerTheme?
-
Parameter used to change theme of the player
final
- playIcon → IconData
-
Icon of play
final
- progressBarBackgroundColor → Color
-
Progress bar background color
final
- progressBarBufferedColor → Color
-
Progress bar buffered video color
final
- progressBarHandleColor → Color
-
Progress bar circle color
final
- progressBarPlayedColor → Color
-
Progress bar played color
final
- qualitiesIcon → IconData
-
Icon of the qualities menu item from overflow menu
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showControls → bool
-
Flag used to show/hide controls
final
- showControlsOnInitialize → bool
-
Flag used to show controls on init
final
- skipBackIcon → IconData
-
Cupertino only icon, icon of skip
final
- skipForwardIcon → IconData
-
Cupertino only icon, icon of forward
final
- subtitlesIcon → IconData
-
Icon of the subtitles menu item from overflow menu
final
- textColor → Color
-
Color of texts
final
- unMuteIcon → IconData
-
Icon of unmute
final
Methods
-
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