dispose method

  1. @SupportedPlatforms.new(platforms: [AndroidPlatform(), IOSPlatform(), MacOSPlatform(), WebPlatform(requiresSameOrigin: false), WindowsPlatform(), LinuxPlatform()])
Future<void> dispose()
override

Disposes the headless WebView.

Officially Supported Platforms/Implementations:

  • Android WebView
  • iOS WKWebView
  • macOS WKWebView
  • Web <iframe>
  • Windows WebView2
  • Linux WPE WebKit

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

Implementation

@SupportedPlatforms(
  platforms: [
    AndroidPlatform(),
    IOSPlatform(),
    MacOSPlatform(),
    WebPlatform(requiresSameOrigin: false),
    WindowsPlatform(),
    LinuxPlatform(),
  ],
)
Future<void> dispose() {
  throw UnimplementedError(
    'dispose is not implemented on the current platform',
  );
}