diff --git a/CHANGELOG.md b/CHANGELOG.md index eff3664..014cb12 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.1.3 + +- [fix] 更新版本号获取方式 + ## 1.1.2 - [feat] 新增版本检查 diff --git a/lib/utils/update_version.dart b/lib/utils/update_version.dart index 9cf724a..d1db88c 100644 --- a/lib/utils/update_version.dart +++ b/lib/utils/update_version.dart @@ -17,7 +17,8 @@ updateAppVersion() async { ); String latestVersion = resp.data['tag_name']; latestVersion = latestVersion.replaceFirst('v', ''); - String currentVersion = '1.0.0'; + PackageInfo packageInfo = await PackageInfo.fromPlatform(); + String currentVersion = packageInfo.version; // 版本号对比 if (isUpdateVersion(latestVersion, currentVersion)) { BotToast.showCustomLoading( diff --git a/pubspec.yaml b/pubspec.yaml index 0fd0805..0921538 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -2,7 +2,7 @@ name: bbmusic description: '哔哔音乐,听歌自由' publish_to: 'none' # Remove this line if you wish to publish to pub.dev -version: 1.1.2+7 +version: 1.1.3+8 environment: sdk: '>=3.3.1 <4.0.0'