📜  flutter 获取操作系统 - Dart 代码示例

📅  最后修改于: 2022-03-11 14:48:06.894000             🧑  作者: Mango

代码示例1
import'dart:io' show Platform;
void main(){
if(Platform.isIOS){
  return someThing();
}else if(Platform.isAndroid){
  return otherThing();
}else if(Platform.isMacOS){
  return anotherThing();
}