setTargetPlatformForDesktop function

void setTargetPlatformForDesktop()

If the current platform is a desktop platform that isn't yet supported by TargetPlatform, override the default platform to one that is. Otherwise, do nothing. No need to handle macOS, as it has now been added to TargetPlatform.

Implementation

void setTargetPlatformForDesktop() {
  if (Platform.isLinux || Platform.isWindows) {
    debugDefaultTargetPlatformOverride = TargetPlatform.fuchsia;
  }
}