launchUrl method
Implementation
Future<bool> launchUrl(String url, LaunchOptions options) {
final bool isWebURL = url.startsWith('http:') || url.startsWith('https:');
final bool useWebView = options.mode == PreferredLaunchMode.inAppWebView ||
(isWebURL && options.mode == PreferredLaunchMode.platformDefault);
return launch(
url,
useSafariVC: useWebView,
useWebView: useWebView,
enableJavaScript: options.webViewConfiguration.enableJavaScript,
enableDomStorage: options.webViewConfiguration.enableDomStorage,
universalLinksOnly:
options.mode == PreferredLaunchMode.externalNonBrowserApplication,
headers: options.webViewConfiguration.headers,
webOnlyWindowName: options.webOnlyWindowName,
);
}