From 184603e95a26a056f06c666aac85d8107157748a Mon Sep 17 00:00:00 2001 From: Pritam-debnath Date: Fri, 24 Jun 2022 13:15:57 +0530 Subject: [PATCH 1/2] fixed buttons on desktop --- .../desktop_welcome_screen.dart | 26 ++++++++++++------- lib/utils/constants.dart | 4 +-- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/lib/desktop_screens/desktop_welcome_screen/desktop_welcome_screen.dart b/lib/desktop_screens/desktop_welcome_screen/desktop_welcome_screen.dart index 369437c4..04075138 100644 --- a/lib/desktop_screens/desktop_welcome_screen/desktop_welcome_screen.dart +++ b/lib/desktop_screens/desktop_welcome_screen/desktop_welcome_screen.dart @@ -623,15 +623,23 @@ class SideBarIcon extends StatelessWidget { } Future _launchInBrowser(String url) async { - if (await canLaunchUrl(Uri(path: url))) { - await launchUrl( - Uri(path: url), - // forceSafariVC: false, - // forceWebView: false, - ); - } else { - throw 'Could not launch $url'; - } + // print("inside launch in browser!"); + // if (await canLaunchUrl(Uri(path: url))) { + // await launchUrl( + // Uri(path: url), + // // forceSafariVC: false, + // // forceWebView: false, + // ); + // } else { + // throw 'Could not launch $url'; + // } + // print(url); + await launchUrl( + Uri( + scheme: 'https', + path: url, + ), + ); } Future _launchInEmail(String email) async { diff --git a/lib/utils/constants.dart b/lib/utils/constants.dart index f2f88260..775cb475 100644 --- a/lib/utils/constants.dart +++ b/lib/utils/constants.dart @@ -15,13 +15,13 @@ class MixedConstants { static const int ROOT_PORT = 64; - static const String TERMS_CONDITIONS = 'https://atsign.com/terms-conditions/'; + static const String TERMS_CONDITIONS = 'atsign.com/terms-conditions/'; static const String FILEBIN_URL = 'https://ck6agzxiog6kmb.atsign.com/'; // static const String PRIVACY_POLICY = 'https://atsign.com/privacy-policy/'; static const String PRIVACY_POLICY = "https://atsign.com/apps/atmosphere/atmosphere-privacy/"; - static const String FAQ = "https://atsign.com/faqs/"; + static const String FAQ = "atsign.com/faqs/"; static const MACOS_STORE_LINK = 'https://apps.apple.com/app/id1550936444'; From 8c5dcecfd3d23cc3d4af4b400123d47aca223808 Mon Sep 17 00:00:00 2001 From: Pritam-debnath Date: Tue, 28 Jun 2022 18:53:57 +0530 Subject: [PATCH 2/2] removed comment and used try catch block --- .../desktop_welcome_screen.dart | 27 +++++++------------ 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/lib/desktop_screens/desktop_welcome_screen/desktop_welcome_screen.dart b/lib/desktop_screens/desktop_welcome_screen/desktop_welcome_screen.dart index 04075138..8fb3d2fd 100644 --- a/lib/desktop_screens/desktop_welcome_screen/desktop_welcome_screen.dart +++ b/lib/desktop_screens/desktop_welcome_screen/desktop_welcome_screen.dart @@ -623,23 +623,16 @@ class SideBarIcon extends StatelessWidget { } Future _launchInBrowser(String url) async { - // print("inside launch in browser!"); - // if (await canLaunchUrl(Uri(path: url))) { - // await launchUrl( - // Uri(path: url), - // // forceSafariVC: false, - // // forceWebView: false, - // ); - // } else { - // throw 'Could not launch $url'; - // } - // print(url); - await launchUrl( - Uri( - scheme: 'https', - path: url, - ), - ); + try { + await launchUrl( + Uri( + scheme: 'https', + path: url, + ), + ); + } catch (e) { + throw 'Could not launch $url'; + } } Future _launchInEmail(String email) async {