resolveDimensions method
The PTY dimensions to open a new session with, or null to let the fit
addon size the terminal to its container (DimensionPreset.autoFit).
device supplies the per-orientation screen boxes for the landscape and
portrait presets.
Implementation
({int cols, int rows})? resolveDimensions(DeviceMetrics device) =>
switch (preset.value) {
DimensionPreset.autoFit => null,
DimensionPreset.standard => (cols: 80, rows: 24),
DimensionPreset.custom => (
cols: customCols.value,
rows: customRows.value,
),
DimensionPreset.landscape => computeFitDims(device.landscape),
DimensionPreset.portrait => computeFitDims(device.portrait),
};