device property

Device? device
final

What this package's previews are framed as when a caller names no device — the panel's canvas, every screenshot, inspect and compare, and the page build-web writes.

Null is a rectangle, and for a phone app that is the wrong picture. Without a device a preview renders at 900 × 700, which is landscape and desktop-shaped: a phone screen laid out in it does not overflow, does not wrap and looks fine, so the default hides the bug you opened the preview to find. Nothing about it looks wrong either, which is why this is declared rather than left to be passed — an agent taking screenshots has no way to know it should have said --device.

One line for the project instead of a --device on every call site, script and CI invocation, one of which will forget. A call that names a device still wins, and --device=fit is how one call asks for the plain rectangle back.

Implementation

final Device? device;