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
Properties
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