1 引入
import ‘dart:io’ show Platform;
2 方法判断
@override
void initState() {
if (Platform.isIOS) {
print("IOS");
} else if (Platform.isAndroid) {
print("安卓");
}
}
1 引入
import ‘dart:io’ show Platform;
2 方法判断
@override
void initState() {
if (Platform.isIOS) {
print("IOS");
} else if (Platform.isAndroid) {
print("安卓");
}
}