StoryManager class
短故事管理器
Constructors
- StoryManager()
-
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
createStoryHome(
{StoryHomeConfig? config}) → Future< Map< String, dynamic> ?> - 创建短故事聚合页
-
destroyStoryHome(
String widgetId) → Future< bool> -
销毁短故事聚合页
widgetId聚合页组件ID -
getCategoryList(
) → Future< List< Map< >String, dynamic> > - 获取分类列表
-
getFavoriteStories(
{int page = 1, int count = 20}) → Future< List< StoryInfo> > -
获取用户收藏的故事列表
page页码(可选,默认1)count每页数量(可选,默认20) -
getLatestStories(
{int count = 10, int page = 1}) → Future< List< StoryInfo> > -
获取最新故事列表
count数量(默认10)page页码(可选,默认1) -
getPopularStories(
{int count = 10, int page = 1}) → Future< List< StoryInfo> > -
获取热门故事列表
count数量(默认10)page页码(可选,默认1) -
getReadHistory(
{int page = 1, int count = 20}) → Future< List< StoryInfo> > -
获取用户阅读历史
page页码(可选,默认1)count每页数量(可选,默认20) -
getRecommendedStories(
{int count = 10, int page = 1}) → Future< List< StoryInfo> > -
获取推荐故事列表
count推荐数量(默认10)page页码(可选,默认1) -
getStoryDetail(
String storyId) → Future< StoryInfo?> -
获取故事详情
storyId故事ID 注意:当前API可能不支持单独获取故事详情,可通过列表或搜索获取 -
getStoryList(
{int? categoryId, int page = 1, int pageSize = 20, bool order = true}) → Future< List< StoryInfo> > -
获取故事列表
categoryId分类ID筛选(可选)page页码(可选,默认1)pageSize每页大小(可选,默认20)order排序方式(可选,默认true为正序) -
markAsRead(
String storyId) → Future< bool> -
标记故事为已读
storyId故事ID -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
searchStory(
String keyword, {bool isFuzzy = true, int page = 1, int count = 20}) → Future< List< StoryInfo> > -
搜索故事
keyword搜索关键词isFuzzy是否模糊搜索(可选,默认true)page页码(可选,默认1)count每页数量(可选,默认20) -
showStoryHome(
String widgetId) → Future< Map< String, dynamic> ?> -
展示短故事聚合页
widgetId聚合页组件ID -
toggleFavorite(
String storyId, bool isFavorite) → Future< bool> -
收藏故事
storyId故事IDisFavorite是否收藏 -
toggleLike(
String storyId, bool isLiked) → Future< bool> -
点赞故事
storyId故事IDisLiked是否点赞 -
toString(
) → String -
A string representation of this object.
inherited
-
updateReadProgress(
String storyId, int readDuration) → Future< bool> -
更新阅读进度
storyId故事IDreadDuration阅读时长(毫秒)
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited