mirror of
https://mirror.ghproxy.com/https://github.com/StarCitizenToolBox/app.git
synced 2024-12-23 00:33:42 +08:00
feat: 使用内置浏览器打开教程
This commit is contained in:
parent
53087306a8
commit
abfd31e001
@ -19,8 +19,8 @@ import 'package:starcitizen_doctor/common/utils/log.dart';
|
|||||||
import 'package:starcitizen_doctor/common/utils/provider.dart';
|
import 'package:starcitizen_doctor/common/utils/provider.dart';
|
||||||
import 'package:starcitizen_doctor/provider/aria2c.dart';
|
import 'package:starcitizen_doctor/provider/aria2c.dart';
|
||||||
import 'package:starcitizen_doctor/ui/home/downloader/home_downloader_ui_model.dart';
|
import 'package:starcitizen_doctor/ui/home/downloader/home_downloader_ui_model.dart';
|
||||||
|
import 'package:starcitizen_doctor/ui/webview/webview.dart';
|
||||||
import 'package:starcitizen_doctor/widgets/widgets.dart';
|
import 'package:starcitizen_doctor/widgets/widgets.dart';
|
||||||
import 'package:url_launcher/url_launcher_string.dart';
|
|
||||||
import 'package:xml/xml.dart';
|
import 'package:xml/xml.dart';
|
||||||
|
|
||||||
import 'dialogs/hosts_booster_dialog_ui.dart';
|
import 'dialogs/hosts_booster_dialog_ui.dart';
|
||||||
@ -488,9 +488,16 @@ class ToolsUIModel extends _$ToolsUIModel {
|
|||||||
if (!context.mounted) return;
|
if (!context.mounted) return;
|
||||||
showToast(context, S.current.app_init_failed_with_reason(e));
|
showToast(context, S.current.app_init_failed_with_reason(e));
|
||||||
}
|
}
|
||||||
await Future.delayed(const Duration(seconds: 3));
|
|
||||||
launchUrlString(
|
if (!context.mounted) return;
|
||||||
"${URLConf.gitApiHome}/SCToolBox/Doc/src/branch/main/Tools/Pk4k_Downloads.md");
|
final webview = WebViewModel(context);
|
||||||
|
await webview.initWebView(
|
||||||
|
title: S.current.tools_action_p4k_download_repair,
|
||||||
|
applicationSupportDir: appGlobalState.applicationSupportDir!,
|
||||||
|
appVersionData: appGlobalState.networkVersionData!);
|
||||||
|
webview.launch(
|
||||||
|
"${URLConf.gitApiHome}/SCToolBox/Doc/src/branch/main/Tools/Pk4k_Downloads.md",
|
||||||
|
appGlobalState.networkVersionData!);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<bool> _checkPhotographyStatus(BuildContext context,
|
Future<bool> _checkPhotographyStatus(BuildContext context,
|
||||||
|
@ -51,7 +51,7 @@ class WebViewModel {
|
|||||||
|
|
||||||
final RsiLoginCallback? loginCallback;
|
final RsiLoginCallback? loginCallback;
|
||||||
|
|
||||||
initWebView(
|
Future<void> initWebView(
|
||||||
{String title = "",
|
{String title = "",
|
||||||
required String applicationSupportDir,
|
required String applicationSupportDir,
|
||||||
required AppVersionData appVersionData}) async {
|
required AppVersionData appVersionData}) async {
|
||||||
|
Loading…
Reference in New Issue
Block a user