fish-redux icon indicating copy to clipboard operation
fish-redux copied to clipboard

如何在返回上一页面后刷新数据?

Open chenzufeng opened this issue 4 years ago • 6 comments
trafficstars

场景: A页面pushB页面,B页面返回A页面后,需要刷新A页面数据。

希望有生命周期可以知道返回A页面了。 原先监听Lifecycle.didUpdateWidget可以实现刷新,但升级Flutter SDK后,这个事件就不触发了。 请问fish-redux如何实现这个场景的刷新?

chenzufeng avatar Mar 11 '21 09:03 chenzufeng

请问有解决吗?

LeeCareFree avatar Apr 04 '21 13:04 LeeCareFree

没有,鉴于目前维护的情况,我们的项目已经移除该库。

发自我的iPhone

在 2021年4月4日,22:00,李元潮 @.***> 写道:

 请问有解决吗?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

chenzufeng avatar Apr 05 '21 01:04 chenzufeng

navigator带方法回调,搞定

alexon6 avatar Apr 15 '21 05:04 alexon6

pushResult(ctx.context, route, (result) { //todo }, arguments: {'xx': xx});

static void pushResult(BuildContext context, String routerName, Function(Object) function, {Object arguments}) { unfocus(); Navigator.pushNamed(context, routerName, arguments: arguments).then((dynamic result) { if (result == null) { return; } function(result); }).catchError((dynamic error) { print('$error'); }); }

alexon6 avatar Apr 15 '21 05:04 alexon6

直接 boradcast(A页面的Action)

colbort avatar May 25 '21 05:05 colbort

直接await push结果就可以了呀

CoolBerry avatar Jul 27 '21 03:07 CoolBerry