大佬教程收集整理的这篇文章主要介绍了如何在 Flutter Bloc 中执行 pull to refresh (LiquidPullToRefresh) 时刷新当前页面,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我在主屏幕上使用 bloc 方法。我想在主屏幕上拉动刷新... 我厌倦了太多的方法没有得到解决......你能提出一些解决方案吗。
在 onrefresh() 旁边,我添加了一些更改
1 . BlocProvIDer(
create: (context) => ottGetAllMovIE(httpClIEnt: http.ClIEnt())
..add(FeedsFetched(Widget.title,"homePage")),//child: HomePage(),child: ottGetHomeInnerCatPage(
wtitle: Widget.title,mixpanelinner: Widget.mixpanel),)
2. _FeedsBloc.add(FeedsFetched(Widget.wtitle,"homePage"));
3. setState(() {
_FeedsBloc.add(FeedsFetched(Widget.wtitle,"homePage"));
BlocProvIDer(
create: (context) => ottGetAllMovIE(httpClIEnt: http.ClIEnt())
..add(FeedsFetched(Widget.title,)
});
虽然
这似乎是您用来获取数据的方法
OttGetAllMovie(httpClient: http.Client())
..add(FeedsFetched(widget.title,"homePage")),
将您的身体包裹在液体中以提神
LiquidPullTorefresh(
key: _refreshInDicatorKey,// key if you want to add
onrefresh: ()async{
//cal your data source
OttGetAllMovie(httpClient: http.Client())
..add(FeedsFetched(widget.title,}
child: ListView(),// scroll view
);
以上是大佬教程为你收集整理的如何在 Flutter Bloc 中执行 pull to refresh (LiquidPullToRefresh) 时刷新当前页面全部内容,希望文章能够帮你解决如何在 Flutter Bloc 中执行 pull to refresh (LiquidPullToRefresh) 时刷新当前页面所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。