windowHeight property

int get windowHeight

Returns the height of the current console window in characters.

Implementation

int get windowHeight {
  if (hasTerminal) {
    return stdout.terminalLines;
  } else {
    // Treat a window that has no terminal as if it is 80x25. This should be
    // more compatible with CI/CD environments.
    return 25;
  }
}