openUrlRequest method

  1. @SupportedPlatforms.new(platforms: [AndroidPlatform(), IOSPlatform(), MacOSPlatform(), WindowsPlatform(), LinuxPlatform()])
Future<void> openUrlRequest({
  1. required URLRequest urlRequest,
  2. @Deprecated('Use settings instead') InAppBrowserClassOptions? options,
  3. InAppBrowserClassSettings? settings,
})

Opens the PlatformInAppBrowser instance with an urlRequest.

urlRequest: The urlRequest to load.

options: Options for the PlatformInAppBrowser.

settings: Settings for the PlatformInAppBrowser.

Officially Supported Platforms/Implementations:

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

Parameters - Officially Supported Platforms/Implementations:

  • urlRequest: all platforms
  • settings: all platforms

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

Implementation

@SupportedPlatforms(
  platforms: [
    AndroidPlatform(),
    IOSPlatform(),
    MacOSPlatform(),
    WindowsPlatform(),
    LinuxPlatform(),
  ],
)
Future<void> openUrlRequest({
  required URLRequest urlRequest,
  // ignore: deprecated_member_use_from_same_package
  @Deprecated('Use settings instead') InAppBrowserClassOptions? options,
  InAppBrowserClassSettings? settings,
}) {
  throw UnimplementedError(
    'openUrlRequest is not implemented on the current platform',
  );
}