如何检查应用程序在背景中的颤动是否最小化? [英] How to check if the app is minimized in background in flutter?
本文介绍了如何检查应用程序在背景中的颤动是否最小化?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有API检查该应用是否已最小化但尚未被杀死,因此它处于后台状态?
Is there an API to check if the app is minimized but haven't being killed yet so it's in background?
我搜索了它,还搜索了GitHub问题,无法解决.
I googled it and also also search in GitHub issues, couldn't fine one.
这样的API是否存在?
Does such API exist?
推荐答案
您可以将WidgetsBindingObserver
mixin添加到一个或多个小部件中,并收听AppLifecycleState
.
You can add WidgetsBindingObserver
mixin to one or more of your widgets and listen to AppLifecycleState
.
此处是文档和示例
这篇关于如何检查应用程序在背景中的颤动是否最小化?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文