We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
flutter 页面 注册生命周期监听,当其他页面生命周期改变的时候, 注册过的页面都会收到消息。
这样有些在可见时的操作,会重复执行。现在想的是在页面增加一个字段,记录当前是否可见,但是这样每个Flutter页面都得这样搞一遍。
不确定框架是否能改成生命周期消息只通知生命周期有改变的Flutter页面,就像原生那样。
The text was updated successfully, but these errors were encountered:
@shownstrong, 有个api可以判断当前页面是否可见:
bool isTopContainer = FlutterBoost.BoostContainer.of(context).onstage
传入你widget的context,就能判断你的widget是否是可见的,如果不可见,则可以避免接收那些消息
Sorry, something went wrong.
类似问题:#514
No branches or pull requests
flutter 页面 注册生命周期监听,当其他页面生命周期改变的时候, 注册过的页面都会收到消息。
这样有些在可见时的操作,会重复执行。现在想的是在页面增加一个字段,记录当前是否可见,但是这样每个Flutter页面都得这样搞一遍。
不确定框架是否能改成生命周期消息只通知生命周期有改变的Flutter页面,就像原生那样。
The text was updated successfully, but these errors were encountered: