From cc960bbf8283da1b23287790e22cd12ec3202dc5 Mon Sep 17 00:00:00 2001 From: Martin Schiller Date: Tue, 7 Nov 2023 13:29:12 +0700 Subject: [PATCH] fix open url --- lib/screens/settings_screen.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/screens/settings_screen.dart b/lib/screens/settings_screen.dart index 93cef3a..cce7ea2 100644 --- a/lib/screens/settings_screen.dart +++ b/lib/screens/settings_screen.dart @@ -89,13 +89,14 @@ class _SettingsScreenState extends State { Widget _buildIconLink(dynamic iconOrImagePath, String tooltip, String url) { return IconButton( icon: (iconOrImagePath is IconData) - ? Icon(iconOrImagePath, color: Colors.teal) + ? Icon(iconOrImagePath, color: Colors.teal) : (iconOrImagePath.endsWith('.svg') ? SvgPicture.asset(iconOrImagePath, color: Colors.teal, width: 24, height: 24) : Image.asset(iconOrImagePath, color: Colors.teal, width: 24, height: 24)), tooltip: tooltip, - onPressed: () => launchUrl(url as Uri), + onPressed: () => launchUrl(Uri.parse(url)), ); } + }