takeScreenshot method

Future<Uint8List?> takeScreenshot({
  1. ScreenshotConfiguration? screenshotConfiguration,
})

Takes a screenshot of the WebView's visible viewport and returns a Uint8List. Returns null if it wasn't be able to take it.

screenshotConfiguration represents the configuration data to use when generating an image from a web view’s contents.

Officially Supported Platforms/Implementations:

Parameters - Officially Supported Platforms/Implementations:

  • screenshotConfiguration: all platforms

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

Implementation

Future<Uint8List?> takeScreenshot({
  ScreenshotConfiguration? screenshotConfiguration,
}) =>
    platform.takeScreenshot(screenshotConfiguration: screenshotConfiguration);