How do I check if the Flutter application is in the foreground or not?

前端 未结 4 1406
情深已故
情深已故 2020-12-29 22:46

I don\'t want to show notification when the app is in foreground. How can I check live state of my app?

4条回答
  •  感动是毒
    2020-12-29 22:59

    My Answer may be late but may be helpful for someone. I also faced this problem there is a plugin which works on both android and ios

    https://pub.dev/packages/flutter_app_lock

    Where you can put you desired lockscreen also it is very flexible.

    Hope someone who stuck like me can get this easily done.

提交回复
热议问题