isDesktopPlatform function

bool isDesktopPlatform()

Checks if the current platform is a desktop platform.

Implementation

bool isDesktopPlatform() {
  return !kIsWeb &&
      (defaultTargetPlatform == TargetPlatform.windows ||
          defaultTargetPlatform == TargetPlatform.macOS ||
          defaultTargetPlatform == TargetPlatform.linux);
}