double periodHeight(Period period) => switch (period) { .nPeriod => noonRowHeight, _ => rowHeight, };