From 2f1ecd50e14657ec01ba9c9edef0451c5d3514ef Mon Sep 17 00:00:00 2001 From: Fabian Freund Date: Thu, 18 Dec 2025 18:37:09 +0100 Subject: [PATCH] catch launch exception --- app/lib/utils/ui_helper.dart | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/lib/utils/ui_helper.dart b/app/lib/utils/ui_helper.dart index ee47fbbb..255acfe8 100644 --- a/app/lib/utils/ui_helper.dart +++ b/app/lib/utils/ui_helper.dart @@ -139,7 +139,13 @@ Future launchUrlFeedback( LaunchMode mode = LaunchMode.externalApplication, }) async { if (await canLaunchUrl(url)) { - if (!await launchUrl(url, mode: mode)) { + try { + if (!await launchUrl(url, mode: mode)) { + if (context.mounted) { + showErrorMessage(context, 'Could not launch URL ($url)'); + } + } + } catch (e) { if (context.mounted) { showErrorMessage(context, 'Could not launch URL ($url)'); }