launchURL static method
- String url, {
- LaunchMode? mode,
Launches the url in an external browser.
Implementation
static Future<void> launchURL(String url, {LaunchMode? mode}) async {
AnalyticsHelper.trackOutlink(url: url);
try {
await launchUrl(
Uri.parse(url),
mode:
mode ??
(Platform.isAndroid
? LaunchMode.externalApplication
: LaunchMode.platformDefault),
);
} catch (e) {
throw 'Could not launch $url,Error: $e';
}
}