centerVertically method

double centerVertically(
  1. double maxHeight,
  2. Size s
)

Implementation

double centerVertically(double maxHeight, Size s) {
  if (maxHeight == double.infinity) {
    return 0;
  }
  return (maxHeight - s.height) / 2;
}