VideoConfig class

The config of VideoView.

Constructors

VideoConfig({double? width, double? height, Color backgroundColor = Colors.black, Color tooltipBackgroundColor = Colors.black54, Color foregroundColor = Colors.white, double textSize = 14, double iconSize = 16, bool useSafe = true, double maxScale = 2.5, double minScale = 0.8, bool panEnabled = false, bool scaleEnabled = false, double? aspectRatio, bool allowedScreenSleep = true, bool autoInitialize = false, bool autoPlay = false, Duration? startAt, double volume = 1.0, bool looping = false, PlaceholderBuilder? overlay, PlaceholderBuilder? placeholderBuilder, bool fullScreenByDefault = false, bool useRootNavigator = true, List<DeviceOrientation>? deviceOrientationsEnterFullScreen, List<SystemUiOverlay> systemOverlaysExitFullScreen = SystemUiOverlay.values, List<DeviceOrientation> deviceOrientationsExitFullScreen = DeviceOrientation.values, bool showControlsOnInitialize = true, FullScreenBuilder<bool>? showControls, Duration hideControlsTimer = const Duration(seconds: 3), ControlsType controlsType = ControlsType.normal, bool showBuffering = true, Widget? bufferingBuilder, FullScreenBuilder<Widget>? finishBuilder, List<Color> controlsBackgroundColor = const <Color>[Color.fromRGBO(0, 0, 0, .7), Color.fromRGBO(0, 0, 0, .3), Color.fromRGBO(0, 0, 0, 0)], bool showCenterPlay = true, CenterPlayButtonBuilder? centerPlayButtonBuilder, bool canLongPress = true, bool canChangeVolumeOrBrightness = true, bool canChangeProgress = true, bool canBack = true, String? title, TextStyle? titleTextStyle, FullScreenBuilder<List<Widget>>? topActionsBuilder, bool showLock = false, CenterActionsBuilder? centerLeftActionsBuilder, CenterActionsBuilder? centerRightActionsBuilder, BottomBuilder? bottomBuilder, FullScreenBuilder<VideoTextPosition>? onTextPosition, FullScreenBuilder<double>? onProgressBarGap, VideoProgressBarColors? videoProgressBarColors, Duration? maxPreviewTime, FullScreenBuilder<Widget>? maxPreviewTimeBuilder})
Overall configuration for the video view. Including width, height, useSafe, backgroundColor etc.

Properties

allowedScreenSleep bool
Defines if the player will sleep in fullscreen or not.
final
aspectRatio double?
The Aspect Ratio of the Video.
final
autoInitialize bool
Initialize the Video on Startup. This will prep the video for playback.
final
autoPlay bool
Play the video as soon as it's displayed.
final
backgroundColor Color
The background color of video.
final
bottomBuilder BottomBuilder?
It is used to define the control buttons at the bottom and the layout of the display content.
final
bufferingBuilder Widget?
Widget to display when buffered is overlaid above the video.
final
canBack bool
Whether to show BackButton.
final
canChangeProgress bool
Whether the video progress can be adjusted.
final
canChangeVolumeOrBrightness bool
Whether the volume or brightness can be adjusted.
final
canLongPress bool
Whether the video can be played at double speed by long pressing.
final
centerLeftActionsBuilder CenterActionsBuilder?
Widgets on the middle left.
final
centerPlayButtonBuilder CenterPlayButtonBuilder?
Play button in the middle.
final
centerRightActionsBuilder CenterActionsBuilder?
Widgets on the middle right.
final
controlsBackgroundColor List<Color>
The background color of the controller.
final
controlsType ControlsType
Types of controls.
final
defaultStyle TextStyle
The style of all text.
no setter
deviceOrientationsEnterFullScreen List<DeviceOrientation>?
Defines the set of allowed device orientations on entering fullscreen.
final
deviceOrientationsExitFullScreen List<DeviceOrientation>
Defines the set of allowed device orientations after exiting fullscreen.
final
finishBuilder FullScreenBuilder<Widget>?
Widget to display when video playback is complete.
final
foregroundColor Color
The color for the video's ButtonandText` widget descendants.
final
fullScreenByDefault bool
Whether to play full screen when auto play is enabled. Valid only if autoPlay is true.
final
hashCode int
The hash code for this object.
no setterinherited
height double?
The height of video.
final
hideControlsTimer Duration
Defines the Duration before the video controls are hidden.
final
iconSize double
Size of all icons.
final
looping bool
Whether the video is looped.
final
maxPreviewTime Duration?
Maximum preview duration.
final
maxPreviewTimeBuilder FullScreenBuilder<Widget>?
The widget displayed when the maximum preview duration is reached.
final
maxScale double
The maximum allowed scale.
final
minScale double
The minimum allowed scale.
final
onProgressBarGap FullScreenBuilder<double>?
The interval width of the progress bar and time information widget.
final
onTextPosition FullScreenBuilder<VideoTextPosition>?
Enumeration value where the progress information is located on the progress bar.
final
overlay PlaceholderBuilder?
A widget which is placed between the video and the controls.
final
panEnabled bool
Whether or not to allow panning.
final
placeholderBuilder PlaceholderBuilder?
Widgets in various initialized states.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scaleEnabled bool
Whether or not to allow zooming.
final
showBuffering bool
Whether to show placeholders in the buffer.
final
showCenterPlay bool
Whether to show the play button in the middle.
final
showControls FullScreenBuilder<bool>?
Whether to display controls.
final
showControlsOnInitialize bool
Whether controls are displayed when initializing the widget.
final
showLock bool
Whether the lockable button is displayed.
final
startAt Duration?
Where does the video start playing when it first plays.
final
systemOverlaysExitFullScreen List<SystemUiOverlay>
Defines the system overlays visible after exiting fullscreen.
final
textSize double
Size of all texts.
final
title String?
The title of video.
final
titleTextStyle TextStyle?
The textStyle of title.
final
tooltipBackgroundColor Color
The background color of a widget that displays information about volume, brightness, speed, playback progress, and so on.
final
topActionsBuilder FullScreenBuilder<List<Widget>>?
Widgets placed at the top right.
final
useRootNavigator bool
Defines if push/pop navigations use the rootNavigator.
final
useSafe bool
Whether to maintain a safe distance from the top.
final
videoProgressBarColors VideoProgressBarColors?
The default colors used throughout the indicator.
final
volume double
The volume of the video, not the device volume.
final
width double?
The width of video.
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