isMultiViewDesktopBootstrapRequired function

bool isMultiViewDesktopBootstrapRequired({
  1. bool? isWeb,
  2. bool? desktopOs,
})

Whether desktop entry must use runMultiApp instead of runApp.

Returns true on macOS / Windows / Linux when not running on web. Hosts that wired Multiview native runners must use bootstrapMultiViewApp (or Infospect.run) whenever this is true — plain runApp leaves Multiview terminate handling without a Dart listener and can hang quit on macOS.

isWeb / desktopOs are injectable for unit tests.

Implementation

bool isMultiViewDesktopBootstrapRequired({
  bool? isWeb,
  bool? desktopOs,
}) {
  if (isWeb ?? kIsWeb) return false;
  return desktopOs ?? _defaultDesktopOs;
}