ScreenshotConfiguration class
Class that represents the configuration data to use when generating an image from a web view’s contents using PlatformInAppWebViewController.takeScreenshot.
Constructors
- ScreenshotConfiguration({InAppWebViewRect? rect, double? snapshotWidth, CompressFormat compressFormat = CompressFormat.PNG, int quality = 100, @Deprecated("Use afterScreenUpdates instead") bool? iosAfterScreenUpdates, bool afterScreenUpdates = true})
Properties
- afterScreenUpdates ↔ 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 tofalse
, theWebView
takes the snapshot immediately, and before incorporating any new changes.getter/setter pair - 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?
-
Use afterScreenUpdates instead.
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 theWebView
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
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts instance to a map.
-
toMap(
) → Map< String, dynamic> - Converts instance to a map.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fromMap(
Map< String, dynamic> ? map) → ScreenshotConfiguration? - Gets a possible ScreenshotConfiguration instance from a Map value.