-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixed Open links of About page in browser #270
Changes from 6 commits
a6cb87c
0893690
8747dfc
4a28014
992f0f4
df0e9da
5a4e734
3290702
9500155
a95848e
7c7e267
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
import 'package:url_launcher/url_launcher.dart'; | ||
import 'package:url_launcher/url_launcher_string.dart'; | ||
|
||
void launchURL(String url) async { | ||
if (await canLaunchUrlString(url)) { | ||
await launchUrlString(url); | ||
var str1 = 'mailto'; | ||
if (url.startsWith(str1)) { | ||
final url = Uri.parse('mailto:support@circuitverse.org'); | ||
await launchUrl(url); | ||
Comment on lines
+6
to
+7
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For mail consider to open in external application. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes it opens in default mail app of smartphone There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i have sent you a video regarding all links on slack, please watch it , it will clear all doubts There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok then it's fine There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
shall i delete the file or revert the changes There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. just delete the file and commit. It will work. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||
} else { | ||
throw 'Could not launch $url'; | ||
await launchUrlString(url, mode: LaunchMode.externalApplication); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Only use LaunchMode.externalApplication for this urls
In any other case open in the app webview itself |
||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can directly write the string inside startswith(...) as str1 is not used anywhere else
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
used the string directly and removed str1.