launch static method
Implementation
static launch(String url) async {
if (url.isEmpty) {
ToastUtils.showToast(Strings.adJumpParamMissing.tr);
return;
}
Uri uri = Uri.parse(url);
try {
if (!await launchUrl(uri, mode: LaunchMode.externalApplication)) {
ToastUtils.showToast(Strings.failedToOpen.tr);
}
} catch (e) {
ToastUtils.showToast(Strings.failedToOpen.tr);
}
}