StoreCanvas class
The image a store receives, in physical pixels.
Kept apart from the Device a shot is rendered on, and that separation is the spine of this design rather than a tidiness. For Apple the two agree: its two required sizes fall out of the device table exactly, so a 6.9" iPhone screenshot is what an iPhone 16 Pro Max renders. For Google Play they cannot: Play refuses any image whose longer side is more than twice its shorter one, and every shipping Android phone is 20:9 — 2.222 — so a truthful full-screen screenshot of a modern Android phone is not a legal Play screenshot. On Play the picture is therefore a composition whose canvas is legal, with a real phone rendered inside it.
Which is why a class carries both numbers and they are allowed to differ.
Constructors
- StoreCanvas({required int width, required int height, double pixelRatio = 1})
-
const
- StoreCanvas.of(Device device)
-
The image a device produces at its own ratio, which is the canvas
wherever a store's size and a real device's happen to coincide.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- height → int
-
final
- label → String
-
1320×2868, for anywhere a size is shown.no setter - logicalHeight → double
-
no setter
- logicalWidth → double
-
The canvas in logical pixels — what a frame's layout is written against.
no setter
- pixelRatio → double
-
What a frame is laid out at — physical pixels per logical one.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- width → int
-
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override