isDesktop property

bool get isDesktop

只有真正的桌面平台才为true;原来用_ => true兜底会把web也当成桌面

Implementation

bool get isDesktop => switch (this) {
      LinuxPlatform() => true,
      MacosPlatform() => true,
      WindowsPlatform() => true,
      _ => false
    };