📅  最后修改于: 2022-03-11 14:57:28.795000             🧑  作者: Mango
import 'dart:io' show Platform, stdout;
void main() {
// Get the operating system as a string.
String os = Platform.operatingSystem;
// Or, use a predicate getter.
if (Platform.isMacOS) {
print('is a Mac');
} else {
print('is not a Mac');
}
}