createWebArchiveData method
- @SupportedPlatforms.new(platforms: [IOSPlatform(apiName: 'WKWebView.createWebArchiveData', apiUrl: 'https://developer.apple.com/documentation/webkit/wkwebview/3650491-createwebarchivedata', available: '14.0'), MacOSPlatform(apiName: 'WKWebView.createWebArchiveData', apiUrl: 'https://developer.apple.com/documentation/webkit/wkwebview/3650491-createwebarchivedata', available: '11.0')])
Creates a web archive of the web view’s current contents asynchronously.
Returns null if a problem occurred.
Officially Supported Platforms/Implementations:
- iOS WKWebView 14.0+ (Official API - WKWebView.createWebArchiveData)
- macOS WKWebView 11.0+ (Official API - WKWebView.createWebArchiveData)
Use the PlatformInAppWebViewController.isMethodSupported method to check if this method is supported at runtime.
Implementation
@SupportedPlatforms(
platforms: [
IOSPlatform(
apiName: 'WKWebView.createWebArchiveData',
apiUrl:
'https://developer.apple.com/documentation/webkit/wkwebview/3650491-createwebarchivedata',
available: '14.0',
),
MacOSPlatform(
apiName: 'WKWebView.createWebArchiveData',
apiUrl:
'https://developer.apple.com/documentation/webkit/wkwebview/3650491-createwebarchivedata',
available: '11.0',
),
],
)
Future<Uint8List?> createWebArchiveData() {
throw UnimplementedError(
'${PlatformInAppWebViewControllerMethod.createWebArchiveData.name} is not implemented on the current platform',
);
}