ScreenshotConfiguration class

Class that represents the configuration data to use when generating an image from a web view’s contents using InAppWebViewController.takeScreenshot.

NOTE for iOS: available from iOS 11.0+.


ScreenshotConfiguration({InAppWebViewRect? rect, double? snapshotWidth, CompressFormat compressFormat = CompressFormat.PNG, int quality = 100, bool iosAfterScreenUpdates = true})


compressFormat CompressFormat
The compression format of the captured image. The default value is CompressFormat.PNG.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
iosAfterScreenUpdates bool
A Boolean value that indicates whether to take the snapshot after incorporating any pending screen updates. The default value of this property is true, which causes the web view to incorporate any recent changes to the view’s content and then generate the snapshot. If you change the value to false, the WebView takes the snapshot immediately, and before incorporating any new changes.
getter/setter pair
quality int
Hint to the compressor, 0-100. The value is interpreted differently depending on the CompressFormat. CompressFormat.PNG is lossless, so this value is ignored.
getter/setter pair
rect InAppWebViewRect?
The portion of your web view to capture, specified as a rectangle in the view’s coordinate system. The default value of this property is null, which captures everything in the view’s bounds rectangle. If you specify a custom rectangle, it must lie within the bounds rectangle of the WebView object.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
snapshotWidth double?
The width of the captured image, in points. Use this property to scale the generated image to the specified width. The web view maintains the aspect ratio of the captured content, but scales it to match the width you specify.
getter/setter pair


noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
toJson() Map<String, dynamic>
toMap() Map<String, dynamic>
toString() String
A string representation of this object.


operator ==(Object other) bool
The equality operator.