版本更新展示目标版本号

This commit is contained in:
xkeyC 2023-10-16 23:26:33 +08:00
parent 9a68167062
commit cd68b3086c
2 changed files with 3 additions and 1 deletions

View File

@ -9,7 +9,7 @@ class UpgradeDialogUI extends BaseUI<UpgradeDialogUIModel> {
Widget? buildBody(BuildContext context, UpgradeDialogUIModel model) {
return Material(
child: ContentDialog(
title: const Text("发现新版本"),
title: Text("发现新版本 -> ${model.targetVersion}"),
constraints:
BoxConstraints(maxWidth: MediaQuery.of(context).size.width * .55),
content: Column(

View File

@ -7,6 +7,7 @@ import 'package:starcitizen_doctor/common/conf.dart';
class UpgradeDialogUIModel extends BaseUIModel {
String? description;
String targetVersion = "";
String downloadUrl = "";
bool isUpgrading = false;
@ -17,6 +18,7 @@ class UpgradeDialogUIModel extends BaseUIModel {
Future loadData() async {
// get download url for gitlab release
try {
targetVersion = AppConf.networkVersionData!.lastVersion!;
final r = await Api.getAppReleaseDataByVersionName(
AppConf.networkVersionData!.lastVersion!);
description = r["description"];