launchInWebViewOrVC static method
Implementation
static Future<void> launchInWebViewOrVC(String url, String title) async {
if (await AppUtils.isNetConnected()) {
if (!await launchUrl(
Uri.parse(url),
mode: LaunchMode.inAppWebView,
webViewConfiguration: WebViewConfiguration(
headers: <String, String>{'my_header_key': title}),
)) {
throw Exception('Could not launch $url');
}
} else {
toToast(getTranslated("noInternetConnection"));
}
}