mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-03-20 22:28:46 +00:00
Add try/catch block in case launch url throws a platform exception
This commit is contained in:
parent
f49695f417
commit
f470723ece
2 changed files with 6 additions and 2 deletions
|
@ -30,6 +30,8 @@ class SettingsLinkProviderCell extends StandardListRow {
|
||||||
color: Palette.blueCraiola));
|
color: Palette.blueCraiola));
|
||||||
|
|
||||||
static void _launchUrl(String url) async {
|
static void _launchUrl(String url) async {
|
||||||
|
try {
|
||||||
await launch(url, forceSafariVC: false);
|
await launch(url, forceSafariVC: false);
|
||||||
|
} catch (e) {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,9 @@ abstract class SupportViewModelBase with Store {
|
||||||
RegularListItem(
|
RegularListItem(
|
||||||
title: S.current.faq,
|
title: S.current.faq,
|
||||||
handler: (BuildContext context) async {
|
handler: (BuildContext context) async {
|
||||||
|
try {
|
||||||
await launch(url);
|
await launch(url);
|
||||||
|
} catch (e) {}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
LinkListItem(
|
LinkListItem(
|
||||||
|
|
Loading…
Reference in a new issue