2023-10-09 09:32:07 +08:00
|
|
|
import 'package:starcitizen_doctor/base/ui_model.dart';
|
2024-01-29 20:44:00 +08:00
|
|
|
import 'package:starcitizen_doctor/common/conf/app_conf.dart';
|
2023-11-07 22:49:09 +08:00
|
|
|
import 'package:starcitizen_doctor/global_ui_model.dart';
|
|
|
|
import 'package:url_launcher/url_launcher_string.dart';
|
2023-10-09 09:32:07 +08:00
|
|
|
|
|
|
|
class AboutUIModel extends BaseUIModel {
|
2023-11-07 22:49:09 +08:00
|
|
|
Future<void> checkUpdate() async {
|
|
|
|
if (AppConf.isMSE) {
|
|
|
|
launchUrlString("ms-windows-store://pdp/?productid=9NF3SWFWNKL1");
|
|
|
|
return;
|
|
|
|
}
|
2023-11-11 01:18:30 +08:00
|
|
|
final hasUpdate = await globalUIModel.doCheckUpdate(context!);
|
2023-11-07 22:49:09 +08:00
|
|
|
if (!hasUpdate) {
|
|
|
|
if (mounted) showToast(context!, "已是最新版本");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|