didChangeAppLifecycleState method
Called when the system puts the app in the background or returns the app to the foreground.
Implementation
void didChangeAppLifecycleState(AppLifecycleState state) {
/// Passing these possible values:
/// AppLifecycleState.inactive (may be paused at any time)
/// AppLifecycleState.paused (may enter the suspending state at any time)
/// AppLifecycleState.detach
/// AppLifecycleState.resumed
}