手机型号:
Future deviceInfo = VRDeviceInfo.deviceInfoBean;
deviceInfo.then((deviceInfo) {
VRDeviceInfoBean deviceInfoBean = deviceInfo;})
return deviceInfoBean.brand
app版本号
PackageInfo packageInfo = await PackageInfo.fromPlatform();
return packageInfo.version
手机系统
if (Platform.isAndroid) {
clientFrom = "Android";
} else if (Platform.isIOS) {
clientFrom = "IOS";
} else {
clientFrom = "else";
}
return clientFrom
这段代码用于获取手机型号,通过VRDeviceInfo获取设备详细信息,并保存在deviceInfoBean中。接着,它获取应用的版本号,通过PackageInfo.fromPlatform()。最后,根据平台(Android或iOS)确定clientFrom的值。
3133

被折叠的 条评论
为什么被折叠?



