launchUrl static method
dynamic
launchUrl(
- dynamic url, {
- LaunchMode mode = LaunchMode.platformDefault,
Opens the given url in the default browser.
Implementation
static launchUrl(url, {LaunchMode mode = LaunchMode.platformDefault}) async {
if (await canLaunchUrlString(url)) {
await launchUrlString(
url,
mode: mode,
);
} else {
showErrorNotice("Error", "Could not launch the $url");
throw 'Could not launch';
}
}