PreviewDevice class
The device a platform previews on: its logical size and pixel density. The oracle captures and the gallery's renders use the same numbers.
- Annotations
Constructors
- PreviewDevice({required Size size, required double devicePixelRatio})
-
Creates a PreviewDevice.
const
Properties
- devicePixelRatio → double
-
Physical pixels per logical pixel.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- physicalSize → Size
-
The size in physical pixels.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size → Size
-
The logical size, in dp / pt.
final
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
Static Methods
-
of(
PreviewPlatform platform) → PreviewDevice -
The device
platformpreviews on.
Constants
- android → const PreviewDevice
-
The Android reference phone: 1080 × 2400 px at 420 dpi (DPR 2.625),
i.e. 411.43 × 914.29 dp — the oracle's
material_oracleAVD. - ios → const PreviewDevice
- The iPhone reference phone: 390 × 844 pt at @3x.