lifecycleState property

AppLifecycleState? lifecycleState

Whether the application is visible, and if so, whether it is currently interactive.

This is set by handleAppLifecycleStateChanged when the SystemChannels.lifecycle notification is dispatched.

The preferred ways to watch for changes to this value are using WidgetsBindingObserver.didChangeAppLifecycleState, or through an AppLifecycleListener object.

Implementation

AppLifecycleState? get lifecycleState => _lifecycleState;