DeviceFrame class

Physical frame the UI is displayed inside. Hosts pick a preset or provide a custom size for embedded targets.

Annotations

Constructors

DeviceFrame({required String id, required String label, required Size logicalSize, double devicePixelRatio = 1.0, BezelConfig? bezel, EdgeInsets? safeArea})
DeviceFrame.custom(double width, double height, {String? id, String? label, double devicePixelRatio = 1.0, BezelConfig? bezel, EdgeInsets? safeArea})
Build a custom frame. label and id are derived from dimensions when the caller does not provide them, so typical embedded targets can pass just the two sizes.
factory

Properties

bezel BezelConfig?
final
devicePixelRatio double
final
hashCode int
The hash code for this object.
no setteroverride
height double
no setter
id String
final
label String
final
logicalSize Size
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
safeArea EdgeInsets?
final
width double
no setter

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.
override

Static Properties

defaults List<DeviceFrame>
Built-in presets loaded by DeviceFrameRegistry.
final
desktop DeviceFrame
no setter
desktop1440 DeviceFrame
final
embedded480x320 DeviceFrame
final
none DeviceFrame
final
phone DeviceFrame
Ergonomic aliases for common host code.
no setter
phoneAndroidPixel8 DeviceFrame
final
phoneIPhone15 DeviceFrame
final
tablet DeviceFrame
no setter
tabletIPadPro11 DeviceFrame
final