From dbae1509ef24e8647426cdf5a4fbfae58958bc38 Mon Sep 17 00:00:00 2001 From: lyy Date: Sat, 26 Oct 2024 11:09:22 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=8F=B7=E8=8E=B7=E5=8F=96=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 4 ++++ lib/utils/update_version.dart | 3 ++- pubspec.yaml | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) 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'