getPlatformName function

String getPlatformName()

获取当前平台的名字

Implementation

String getPlatformName() {
  if (kIsWeb) {
    return "web";
  }
  try {
    return Platform.operatingSystem;
  } catch (e) {
    return "error";
  }
}