StoryHomeController class

短故事聚合页控制器

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

使用示例:

final controller = StoryHomeController();

StoryHomeNativeView(
  onCreated: (viewId) {
    controller.initialize(viewId);
  },
)

// 手动展示聚合页(如果需要)
await controller.show();

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

Constructors

StoryHomeController()

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
widgetId String?
获取widgetId(如果需要直接访问)
no setter

Methods

destroy() Future<bool>
手动销毁聚合页实例
dispose() Future<void>
清除widgetId并销毁聚合页实例
initialize(String widgetId) → void
初始化widgetId(由 Widget 内部调用)
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
show() Future<Map<String, dynamic>>
展示短故事聚合页
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited