void didChangeAppLifecycleState(AppLifecycleState state)

Called when the system puts the app in the background or returns the app to the foreground.

Source

void didChangeAppLifecycleState(AppLifecycleState state) { }