getPlatformName static method
Gets the platform name as a string.
Implementation
static String getPlatformName() {
if (Platform.isMacOS) return 'macOS';
if (Platform.isLinux) return 'Linux';
if (Platform.isWindows) return 'Windows';
return Platform.operatingSystem;
}