ScreenshotOptions class
Screenshot size guard.
Flutter captures the widget tree itself, so the size guard is applied as a
capture pixel ratio rather than a post-hoc resize: a maxWidth of 1280 on a
3x 400pt-wide screen captures at 3.2x → clamped to 3x, while a tablet at
1024pt captures at 1.25x. Output is always PNG (dart:ui encodes PNG only),
so there is no quality knob — lower maxWidth to shrink a report.
- Annotations
Constructors
- ScreenshotOptions({double maxWidth = 1280, double? pixelRatio})
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- maxWidth → double
-
Max captured width in device pixels. Ignored when pixelRatio is set.
final
- pixelRatio → double?
-
Exact capture pixel ratio, overriding the maxWidth calculation.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited