diff --git a/app/lib/utils/ui_helper.dart b/app/lib/utils/ui_helper.dart index 35c6d83f..fe732cea 100644 --- a/app/lib/utils/ui_helper.dart +++ b/app/lib/utils/ui_helper.dart @@ -17,9 +17,15 @@ Future launchUrlFeedback( Uri url, { LaunchMode mode = LaunchMode.externalApplication, }) async { - if (!await launchUrl(url, mode: mode)) { + if (await canLaunchUrl(url)) { + if (!await launchUrl(url, mode: mode)) { + if (context.mounted) { + showErrorMessage(context, 'Could not launch URL ($url)'); + } + } + } else { if (context.mounted) { - showErrorMessage(context, 'Could not launch URL ($url)'); + showErrorMessage(context, 'Can not handle "${url.scheme}"'); } } }