NativeVideoView class

Widget that displays a video player. This widget calls an underlying player in the respective platform, VideoView in Android and AVPlayer in iOS.

Inheritance

Constructors

NativeVideoView({Key? key, bool? keepAspectRatio, bool? showMediaController, bool? useExoPlayer, bool? autoHide, Duration? autoHideTime, bool? enableVolumeControl, required ViewCreatedCallback onCreated, required PreparedCallback onPrepared, required CompletionCallback onCompletion, ErrorCallback? onError, ProgressionCallback? onProgress})
Constructor of the widget.
const

Properties

autoHide bool?
Determines if the controller should hide automatically.
final
autoHideTime Duration?
The time after which the controller will automatically hide.
final
enableVolumeControl bool?
Enables the drag gesture over the video to control the volume.
final
hashCode int
The hash code for this object.
no setterinherited
keepAspectRatio bool?
Wraps the PlatformView in an AspectRatio to resize the widget once the video is loaded.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onCompletion CompletionCallback
Instance of CompletionCallback to notify when a video has finished playing.
final
onCreated ViewCreatedCallback
Instance of ViewCreatedCallback to notify when the view is finished creating.
final
onError ErrorCallback?
Instance of ErrorCallback to notify when the player had an error loading the video source.
final
onPrepared PreparedCallback
Instance of PreparedCallback to notify when the player is ready to start the playback of a video.
final
onProgress ProgressionCallback?
Instance of ProgressionCallback to notify when the time progresses while playing.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showMediaController bool?
Shows a default media controller to control the player state.
final
useExoPlayer bool?
Forces the use of ExoPlayer instead of the native VideoView.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _NativeVideoViewState
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

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