DramaSwipeFlowController class
短剧滑滑流控制器
封装滑滑流ID管理和控制方法,简化使用。 配合 DramaSwipeFlowNativeView 使用,自动处理滑滑流生命周期。
使用示例:
final controller = DramaSwipeFlowController();
DramaSwipeFlowNativeView(
config: DramaSwipeFlowConfig(...),
controller: controller,
)
// 在 TabBar 切换时控制暂停/恢复
controller.pause(); // 切换走时暂停
controller.resume(); // 切换回来时恢复
// 销毁时自动调用
controller.dispose();
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isReady → bool
-
滑滑流是否已准备就绪
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- swipeFlowId → String?
-
获取滑滑流ID(如果需要直接访问)
no setter
Methods
-
dispose(
) → Future< void> - 清除滑滑流ID
-
getCurrentDramaIndex(
) → Future< int> - 获取当前短剧集数索引
-
initialize(
String swipeFlowId) → void - 初始化滑滑流ID(由 Widget 内部调用)
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
openMoreDialog(
) → Future< bool> - 打开更多弹窗(举报、设置等)
-
pause(
) → Future< void> - 暂停滑滑流播放
-
resume(
) → Future< void> - 恢复滑滑流播放
-
seekTo(
int time) → Future< bool> -
跳转到指定播放位置
time跳转位置(毫秒) -
setCurrentDramaIndex(
int index) → Future< bool> -
设置当前短剧集数索引
index集数索引值 -
setCurrentPage(
int position) → Future< bool> -
设置当前页面位置
position页面索引值 -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited