SuperPlayerComponent class

Inheritance

Constructors

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

Properties

controlsEnabled bool
final
hashCode int
The hash code for this object.
no setterinherited
isControllerDisposedExternally bool Function()?
若为 true 表示 controller 已由外部(如 Obs)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 就绪时回调,供外部持有并控制(如 seek、暂停等)
final
onEnded VoidCallback?
播放结束(回放时通知 Native)
final
onError → void Function(String message)?
加载/播放错误(回放时通知 Native)
final
onProgress → void Function(int positionSec)?
播放进度回调,单位:秒
final
onSwapTap VoidCallback?
交换白板/老师视频位置(仅回放竖屏有效)
final
onToggleFullscreen 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<SuperPlayerComponent>
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