How to handle android lifecycle in flutter android plugin package
问题 I need to know the current state of the flutter app view in an android plugin package. For now, I observe the state in the flutter view with https://docs.flutter.io/flutter/widgets/WidgetsBindingObserver-class.html and pass it then to my plugin. As this seems sometimes not perfect (the first event is not passed on Android) I would like to get the state directly from the android plugin. In the plugin I get the registrar and can its activity, but how do I observe the state of it? 回答1: Flutter