mirror of
https://mirror.ghproxy.com/https://github.com/StarCitizenToolBox/app.git
synced 2024-12-23 01:53:41 +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) {
|
Widget? buildBody(BuildContext context, UpgradeDialogUIModel model) {
|
||||||
return Material(
|
return Material(
|
||||||
child: ContentDialog(
|
child: ContentDialog(
|
||||||
title: const Text("发现新版本"),
|
title: Text("发现新版本 -> ${model.targetVersion}"),
|
||||||
constraints:
|
constraints:
|
||||||
BoxConstraints(maxWidth: MediaQuery.of(context).size.width * .55),
|
BoxConstraints(maxWidth: MediaQuery.of(context).size.width * .55),
|
||||||
content: Column(
|
content: Column(
|
||||||
|
@ -7,6 +7,7 @@ import 'package:starcitizen_doctor/common/conf.dart';
|
|||||||
|
|
||||||
class UpgradeDialogUIModel extends BaseUIModel {
|
class UpgradeDialogUIModel extends BaseUIModel {
|
||||||
String? description;
|
String? description;
|
||||||
|
String targetVersion = "";
|
||||||
String downloadUrl = "";
|
String downloadUrl = "";
|
||||||
|
|
||||||
bool isUpgrading = false;
|
bool isUpgrading = false;
|
||||||
@ -17,6 +18,7 @@ class UpgradeDialogUIModel extends BaseUIModel {
|
|||||||
Future loadData() async {
|
Future loadData() async {
|
||||||
// get download url for gitlab release
|
// get download url for gitlab release
|
||||||
try {
|
try {
|
||||||
|
targetVersion = AppConf.networkVersionData!.lastVersion!;
|
||||||
final r = await Api.getAppReleaseDataByVersionName(
|
final r = await Api.getAppReleaseDataByVersionName(
|
||||||
AppConf.networkVersionData!.lastVersion!);
|
AppConf.networkVersionData!.lastVersion!);
|
||||||
description = r["description"];
|
description = r["description"];
|
||||||
|
Loading…
Reference in New Issue
Block a user