SuperPlayerComponent class

Inheritance

Constructors

SuperPlayerComponent({Key? key, required String url, VoidCallback? onToggleFullscreen, VoidCallback? onSwapTap, bool controlsEnabled = true, void onProgress(double positionSec)?, void onControllerReady(VideoPlayerController controller)?, VoidCallback? onFirstFrameReady, void onControllerDispose()?, Future<void> awaitBeforeControllerDispose(VideoPlayerController controller)?, void onControllerReleased(VideoPlayerController controller)?, bool isControllerDisposedExternally()?, bool isControllerDisposedExternallyForController(VideoPlayerController controller)?, VoidCallback? onEnded, void onError(String message)?, bool offlineMode = false, bool muted = false, bool showSkeletonCenterPlaceholder = true, VideoViewType? viewType})
const

Properties

awaitBeforeControllerDispose → Future<void> Function(VideoPlayerController controller)?
dispose 前等待(如老师对轴 seek 完成),避免 controller 已 dispose 仍收 seek 回调崩溃
final
controlsEnabled → bool
final
hashCode → int
The hash code for this object.
no setterinherited
isControllerDisposedExternally → bool Function()?
若为 true 表示 controller 已由外部(如 Obs)dispose,本组件不再调用 dispose 避免重复释放
final
isControllerDisposedExternallyForController → bool Function(VideoPlayerController controller)?
按 controller 实例判断是否已由外部释放,避免快速重入时旧组件误用新会话释放标记。
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
muted → bool
final
offlineMode → bool
final
onControllerDispose → void Function()?
播放器 controller 即将被 dispose 时回调,外部应停止使用该引用
final
onControllerReady → void Function(VideoPlayerController controller)?
播放器 controller 就绪时回调,供外部持有并控制(如 seek、暂停等)
final
onControllerReleased → void Function(VideoPlayerController controller)?
在 await 之后、dispose 之前按实例释放 Obs 引用
final
onEnded → void Function()?
播放结束(回放时通知 Native)
final
onError → void Function(String message)?
加载/播放错误(回放时通知 Native)
final
onFirstFrameReady → void Function()?
视频首帧可用时回调;当前以 controller 首次 initialized 作为首帧可显示信号。
final
onProgress → void Function(double positionSec)?
播放进度回调,秒(含小数)
final
onSwapTap → void Function()?
交换白板/老师视频位置(仅回放竖屏有效)
final
onToggleFullscreen → void Function()?
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
showSkeletonCenterPlaceholder → bool
final
url → String
final
viewType → VideoViewType?
视频渲染方式。为 null 时使用平台默认值(Android: platformView, iOS: textureView)。 指定 textureView 可避免多个播放器几何重叠时的 Android PlatformView z-order 冲突。
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