Skip to content

Commit

Permalink
feat: 更新版本号获取方式
Browse files Browse the repository at this point in the history
  • Loading branch information
lyy committed Oct 26, 2024
1 parent 79521e0 commit dbae150
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.1.3

- [fix] 更新版本号获取方式

## 1.1.2

- [feat] 新增版本检查
Expand Down
3 changes: 2 additions & 1 deletion lib/utils/update_version.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit dbae150

Please sign in to comment.