DramaHomeController class

短剧聚合页控制器

封装聚合页ID管理和控制方法,简化使用。 配合 DramaHomeNativeView 使用,自动处理聚合页生命周期。

使用示例:

final controller = DramaHomeController();

DramaHomeNativeView(
  config: DramaHomeConfig(...),
  controller: controller,
)

// 控制播放和页面切换
controller.seekTo(5000);  // 跳转到5秒位置
controller.setCurrentPage(2);  // 切换到第3页
controller.setCurrentDramaIndex(10);  // 切换到第11集
controller.openMoreDialog();  // 打开更多弹窗
controller.backRefresh();  // 返回并刷新

// 销毁时自动调用
controller.dispose();

Constructors

DramaHomeController()

Properties

hashCode int
The hash code for this object.
no setterinherited
homeId String?
获取聚合页ID(如果需要直接访问)
no setter
isReady bool
聚合页是否已准备就绪
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

backRefresh() Future<bool>
返回并刷新页面
dispose() Future<void>
清除聚合页ID
getCurrentDramaIndex() Future<int>
获取当前短剧集数索引
initialize(String homeId) → void
初始化聚合页ID(由 Widget 内部调用)
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
openMoreDialog() Future<bool>
打开更多弹窗(举报、设置等)
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