fetchWebViewData method

  1. @SupportedPlatforms(platforms: [IOSPlatform(available: '26.0', apiName: 'WKWebView.fetchData(of:completionHandler:)', apiUrl: 'https://developer.apple.com/documentation/webkit/wkwebview/fetchdata(of:completionhandler:)'), MacOSPlatform(available: '26.0', apiName: 'WKWebView.fetchData(of:completionHandler:)', apiUrl: 'https://developer.apple.com/documentation/webkit/wkwebview/fetchdata(of:completionhandler:)')])
Future<Uint8List?> fetchWebViewData({
  1. required Set<WebViewDataType> dataTypes,
})

Fetches a serialized blob of WebView data such as session storage.

Officially Supported Platforms/Implementations:

Parameters - Officially Supported Platforms/Implementations:

  • dataTypes: all platforms

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

Implementation

@SupportedPlatforms(
  platforms: [
    IOSPlatform(
      available: '26.0',
      apiName: 'WKWebView.fetchData(of:completionHandler:)',
      apiUrl:
          'https://developer.apple.com/documentation/webkit/wkwebview/fetchdata(of:completionhandler:)',
    ),
    MacOSPlatform(
      available: '26.0',
      apiName: 'WKWebView.fetchData(of:completionHandler:)',
      apiUrl:
          'https://developer.apple.com/documentation/webkit/wkwebview/fetchdata(of:completionhandler:)',
    ),
  ],
)
Future<Uint8List?> fetchWebViewData({required Set<WebViewDataType> dataTypes}) {
  throw UnimplementedError(
    '${PlatformInAppWebViewControllerMethod.fetchWebViewData.name} is not implemented on the current platform',
  );
}