From 2aaae95a9060f030786f24a730f0c7981f296c87 Mon Sep 17 00:00:00 2001 From: YiHungWONG <40423264+yihong1120@users.noreply.github.com> Date: Sat, 30 Dec 2023 18:40:56 +0000 Subject: [PATCH] use canLaunchUrl --- lib/services/social_service.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/services/social_service.dart b/lib/services/social_service.dart index 7d32e22..64087d9 100644 --- a/lib/services/social_service.dart +++ b/lib/services/social_service.dart @@ -51,7 +51,7 @@ class SocialService { final String loginUrl = '$baseUrl/social/login/${provider.id}'; // 使用 url_launcher 打开浏览器窗口 - if (await canLaunch(loginUrl)) { + if (await canLaunchUrl(loginUrl)) { await launch(loginUrl); } else { throw 'Could not launch $loginUrl';