Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

希望添加onresume和onstop生命周期,在page里 #408

Open
zhangruiyu opened this issue Jul 21, 2019 · 6 comments
Open

希望添加onresume和onstop生命周期,在page里 #408

zhangruiyu opened this issue Jul 21, 2019 · 6 comments
Labels
enhancement New feature or request

Comments

@zhangruiyu
Copy link

希望添加onresume和onstop生命周期,在page里,感觉fish_redux应该能实现0-0这么棒的框架

@zjuwjf
Copy link
Contributor

zjuwjf commented Jul 22, 2019

#359 是你希望的onresume和onstop么?

@zhangruiyu
Copy link
Author

大致是的 但是会加入那种: A->B 由B页面返回到A页面,然后A页面走生命周期onresume这种吗,同理还有onstop

@zhangruiyu
Copy link
Author

虽然可以在跳转的await后处理onresume的逻辑,但是一个页面有多个跳转的话,代码写着太混乱了

@zjuwjf zjuwjf added the enhancement New feature or request label Jul 22, 2019
@hasonguo
Copy link

hasonguo commented Jan 7, 2020

楼主解决了吗?两个Flutter页面,一个PageA 一个PageB,PageA跳到PageB,然后点击返回键返回到PageA,pageA的哪个生命周期回执行啊,我想每次进pageA都要重新请求数据

@Coldsparkle
Copy link

楼主解决了吗?两个Flutter页面,一个PageA 一个PageB,PageA跳到PageB,然后点击返回键返回到PageA,pageA的哪个生命周期回执行啊,我想每次进pageA都要重新请求数据

可以在push返回的Future中处理, 比如说Navigator.of(context).push(pageB).then((_) {在这里处理});PageB pop后这个函数会被调用

@zhangruiyu
Copy link
Author

楼主解决了吗?两个Flutter页面,一个PageA 一个PageB,PageA跳到PageB,然后点击返回键返回到PageA,pageA的哪个生命周期回执行啊,我想每次进pageA都要重新请求数据

可以在push返回的Future中处理, 比如说Navigator.of(context).push(pageB).then((_) {在这里处理});PageB pop后这个函数会被调用

这种极其不优雅 , 如果是主页,跳转的多呢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants