close method

  1. @SupportedPlatforms.new(platforms: [AndroidPlatform(), IOSPlatform(), MacOSPlatform(), WindowsPlatform(), LinuxPlatform()])
Future<void> close()

Closes the server.

Officially Supported Platforms/Implementations:

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

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

Implementation

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