saveWebArchive method

Future<String?> saveWebArchive({
  1. required String filePath,
  2. bool autoname = false,
})

Saves the current WebView as a web archive. Returns the file path under which the web archive file was saved, or null if saving the file failed.

filePath represents the file path where the archive should be placed. This value cannot be null.

autoname if false, takes filePath to be a file. If true, filePath is assumed to be a directory in which a filename will be chosen according to the URL of the current page.

Officially Supported Platforms/Implementations:

Parameters - Officially Supported Platforms/Implementations:

  • filePath: all platforms
  • autoname: all platforms

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

Implementation

Future<String?> saveWebArchive({
  required String filePath,
  bool autoname = false,
}) => platform.saveWebArchive(filePath: filePath, autoname: autoname);