keyboardFor method
How tall this device's keyboard is when a field asks for variant.
The one place a variant becomes a number, so nothing downstream has to know which variants differ on which platform — an iPad answers the same height for all four, and that is a property of the iPad rather than something a caller should special-case.
Already turned: call it on the device oriented gave you.
Implementation
double keyboardFor(KeyboardVariant variant) => switch (variant) {
KeyboardVariant.keypad => keypadKeyboard ?? keyboard,
// Email and URL are the *same* keyboard with two keys swapped in the
// bottom row, on every device measured. They differ in the picture and
// not in the height.
_ => keyboard,
};