PlayerComponent class

Inheritance

Constructors

PlayerComponent({Key? key, required String url, void onProgress(int positionSec)?, void onControllerReady(VideoPlayerController controller)?, void onControllerDispose()?, bool isControllerDisposedExternally()?, VoidCallback? onSwapTap, VoidCallback? onEnded, void onError(String message)?, bool controlsEnabled = true, bool offlineMode = false})
const

Properties

controlsEnabled bool
final
hashCode int
The hash code for this object.
no setterinherited
isControllerDisposedExternally bool Function()?
若返回 true 表示 controller 已由外部 dispose,内部不再重复 dispose
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
offlineMode bool
final
onControllerDispose → void Function()?
播放器 controller 即将被 dispose 时回调
final
onControllerReady → void Function(VideoPlayerController controller)?
播放器 controller 就绪时回调
final
onEnded VoidCallback?
播放结束(回放时通知 Native)
final
onError → void Function(String message)?
加载/播放错误(回放时通知 Native)
final
onProgress → void Function(int positionSec)?
播放进度回调,单位:秒
final
onSwapTap VoidCallback?
交换白板/老师视频位置(仅回放竖屏有效)
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
url String
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<PlayerComponent>
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, int wrapWidth = 65}) 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