launchUrl method

Future<bool> launchUrl(
  1. String url,
  2. LaunchOptions options
)

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,
  );
}