didChangeAppLifecycleState method

void didChangeAppLifecycleState(
  1. AppLifecycleState state
)

Implementation

void didChangeAppLifecycleState(AppLifecycleState state) {
  if (state == AppLifecycleState.paused) {
    goOffline();
  } else if (state == AppLifecycleState.resumed) {
    goOnline();
  }
}