isDesktop top-level property

bool get isDesktop

Test if we are running on a desktop platform but not in a browser.

Implementation

bool get isDesktop {
  if (kIsWeb) return false;

  return Platform.isLinux || Platform.isMacOS || Platform.isWindows;
}