fix: windows保存图片改成打开官网,gal有兼容

This commit is contained in:
speakeloudest 2026-01-14 19:21:27 -08:00
parent b65539801d
commit a5440aec53

View File

@ -13,6 +13,19 @@ class HIAntiLostController extends GetxController {
final GlobalKey repaintKey = GlobalKey(); final GlobalKey repaintKey = GlobalKey();
Future<void> saveImage() async { Future<void> saveImage() async {
if (Platform.isWindows) {
final Uri webUrl = Uri.parse('https://hifastvpn.com/');
try {
final ok =
await launchUrl(webUrl, mode: LaunchMode.externalApplication);
if (!ok) {
KRCommonUtil.kr_showToast("无法打开链接");
}
} catch (e) {
KRCommonUtil.kr_showToast("无法打开链接");
}
return;
}
KRCommonUtil.kr_showLoading(message: "正在保存..."); KRCommonUtil.kr_showLoading(message: "正在保存...");
try { try {
// Check permission // Check permission