catch launch exception
This commit is contained in:
1 parent
606df87bd7
commit
2f1ecd50e1
1 file changed
+7
-1
@@ -139,7 +139,13 @@ Future<void> 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)');
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user