restoreWebViewData method

  1. @SupportedPlatforms(platforms: [IOSPlatform(available: '26.0', apiName: 'WKWebView.restoreData(_:completionHandler:)', apiUrl: 'https://developer.apple.com/documentation/webkit/wkwebview/restoredata(_:completionhandler:)'), MacOSPlatform(available: '26.0', apiName: 'WKWebView.restoreData(_:completionHandler:)', apiUrl: 'https://developer.apple.com/documentation/webkit/wkwebview/restoredata(_:completionhandler:)')])
Future<void> restoreWebViewData({
  1. required Uint8List data,
})

Restores WebView data previously returned by fetchWebViewData.

Officially Supported Platforms/Implementations:

Parameters - Officially Supported Platforms/Implementations:

  • data: 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.restoreData(_:completionHandler:)',
      apiUrl:
          'https://developer.apple.com/documentation/webkit/wkwebview/restoredata(_:completionhandler:)',
    ),
    MacOSPlatform(
      available: '26.0',
      apiName: 'WKWebView.restoreData(_:completionHandler:)',
      apiUrl:
          'https://developer.apple.com/documentation/webkit/wkwebview/restoredata(_:completionhandler:)',
    ),
  ],
)
Future<void> restoreWebViewData({required Uint8List data}) {
  throw UnimplementedError(
    '${PlatformInAppWebViewControllerMethod.restoreWebViewData.name} is not implemented on the current platform',
  );
}