setAppForegroundState function
Sets the foreground state of the app. When in the foreground, the mesh engine aggressively scans for peers.
Implementation
void setAppForegroundState(bool isForeground) {
_log('App foreground state changed: $isForeground');
_isAppForeground = isForeground;
if (isForeground) {
triggerImmediateSync();
}
}