shouldWatchForegroundProcess function

  1. @visibleForTesting
bool shouldWatchForegroundProcess({
  1. required bool isWindows,
  2. required bool? initialForegroundRunning,
})

Whether FlutterPtyBackend should expose a foreground listenable.

Windows and platforms that return null from the underlying PTY skip polling so hosts see null rather than a stuck false notifier.

Implementation

@visibleForTesting
bool shouldWatchForegroundProcess({
  required bool isWindows,
  required bool? initialForegroundRunning,
}) =>
    !isWindows && initialForegroundRunning != null;