rotated method
This device on its side, whatever it thinks of the idea — oriented is the one that asks canRotate first.
Keeps id and label: a rotated iPad is still ipad, which is what lets
the frame lookup and every saved address go on working.
Implementation
Device rotated() => Device(
id,
label,
kind: kind,
platform: platform,
group: group,
width: height,
height: width,
pixelRatio: pixelRatio,
insetTop: landscape?.top ?? insetTop,
insetRight: landscape?.right ?? insetRight,
insetBottom: landscape?.bottom ?? insetBottom,
insetLeft: landscape?.left ?? insetLeft,
landscape: landscape,
keyboard: landscapeKeyboard ?? keyboard,
landscapeKeyboard: landscapeKeyboard,
// **Not `?? keypadKeyboard`.** A portrait keypad is *taller* than a
// landscape letters keyboard on every phone in the table, so falling back
// to it would turn on a shrink that grows the keyboard. Null here is the
// conservative answer the field documents: no shrink, letters height.
keypadKeyboard: landscapeKeypadKeyboard,
landscapeKeypadKeyboard: landscapeKeypadKeyboard,
);