flutter 获取当前手机系统型号和当前app版本号
手机型号:})app版本号手机系统} else {
·
手机型号:
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
更多推荐
已为社区贡献5条内容
所有评论(0)