PreviewSpec class
The pixel sizes Apple accepts for one PreviewType.
Not ScreenshotSpec with different numbers, and the differences are the reason it is a second class. Apple's preview sizes are not device resolutions at all — every current iPhone publishes a 886x1920 preview, which is no iPhone's screen — so the "capture it and it fits" intuition that holds for screenshots is false here and the error has to say the number. And the transpose is not always legal: a Mac or Apple TV preview is landscape only, so accepting a 1080x1920 file for a landscapeOnly slot would wave through the one video Apple is certain to refuse.
The enum values are spelled differently from the screenshot ones, which
is the trap this type exists to make unmissable: a screenshot slot is
APP_IPHONE_67 and the preview slot for the same device is IPHONE_67,
with no prefix. Verified against Apple's PreviewType and
ScreenshotDisplayType, which are two separate enumerations.
Apple is the authority, not this table, exactly as for ScreenshotSpec: https://developer.apple.com/help/app-store-connect/reference/app-preview-specifications/
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- label → String
-
How Apple names this slot in the console, for error messages.
final
- landscapeOnly → bool
-
Apple takes this slot in landscape only — Mac and Apple TV.
final
- orientationDescription → String
-
no setter
-
portraitSizes
→ List<
({int height, int width})> -
Stated portrait-first even for a landscapeOnly slot, so the table reads
one way; accepts is what applies the orientation rule.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sizesDescription → String
-
no setter
Methods
-
accepts(
int width, int height) → bool -
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