offsetForVertical function
Implementation
int offsetForVertical(
VerticalAlign align,
int containerHeight,
int childHeight,
) {
return switch (align) {
VerticalAlign.top => 0,
VerticalAlign.center => (containerHeight - childHeight) ~/ 2,
VerticalAlign.bottom => containerHeight - childHeight,
};
}