openWithSystemBrowser method

  1. @override
Future<void> openWithSystemBrowser({
  1. required WebUri url,
})

This is a static method that opens an url in the system browser. You wont be able to use the PlatformInAppBrowser events and methods here.

Officially Supported Platforms/Implementations:

  • Android WebView
  • iOS WKWebView
  • macOS WKWebView
  • Windows WebView2
  • Linux WPE WebKit

Parameters - Officially Supported Platforms/Implementations:

  • url: all platforms

Use the PlatformInAppBrowser.isMethodSupported method to check if this method is supported at runtime.

Implementation

@override
Future<void> openWithSystemBrowser({required WebUri url}) async {
  assert(url.toString().isNotEmpty);

  Map<String, dynamic> args = <String, dynamic>{};
  args.putIfAbsent('url', () => url.toString());
  return await _staticChannel.invokeMethod('openWithSystemBrowser', args);
}