mirror of
https://mirror.ghproxy.com/https://github.com/StarCitizenToolBox/app.git
synced 2024-12-22 21:03:42 +08:00
版本更新展示目标版本号
This commit is contained in:
parent
9a68167062
commit
cd68b3086c
@ -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(
|
||||
|
@ -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"];
|
||||
|
Loading…
Reference in New Issue
Block a user