isAppForeground method

bool isAppForeground()

check if the Flutter application is in the foreground

Implementation

bool isAppForeground(){
 State? myState = getCurrentState();
 return myState != null;
  }