openUrl static method
Opens up the browser with the given url
in the given launchMode
.
Implementation
static Future openUrl({
required String url,
LaunchMode launchMode = LaunchMode.externalApplication,
}) async {
try {
final uri = Uri.parse(url);
await launchUrl(uri, mode: launchMode);
} catch (error, stackTrace) {
ErrorLogger.instance.logError(
error: error,
stackTrace: stackTrace,
file: "url_launcher_helper",
event: "openUrl",
);
return Future.error(error);
}
}