getAppLifeCycle method
Returns the current state of the app lifecycle in regards to notifications.
The returned value is an enumerator of type NotificationLifeCycle
. The possible
values are:
-
NotificationLifeCycle.Foreground: The app is currently in the foreground and actively being used by the user.
-
NotificationLifeCycle.Background: The app is currently in the background and not actively being used by the user, but still running.
-
NotificationLifeCycle.AppKilled: The app has been killed and is not running.
This method returns a Future that resolves to a NotificationLifeCycle
value
representing the current state of the app in regards to notifications.
Implementation
@override
Future<NotificationLifeCycle> getAppLifeCycle() {
return AwesomeNotificationsPlatform.instance.getAppLifeCycle();
}