flutter build信息

安装依赖

package_info: 0.4.0

导入

import 'package:package_info/package_info.dart';

使用

PackageInfo packageInfo = await PackageInfo.fromPlatform();
String versionName = packageInfo.version;
String versionCode = packageInfo.buildNumber;

参考

https://stackoverflow.com/questions/54357468/how-to-set-build-and-version-number-of-flutter-app

版本编译

https://medium.com/@ralphbergmann/versioning-with-flutter-299869e68af4

你可能感兴趣的:(flutter build信息)