clear function

void clear(
  1. Screen screen
)

Screen helpers for clearing/filling/cloning.

Clears the entire screen to empty cells.

Implementation

/// Clears the entire [screen] to empty cells.
void clear(Screen screen) {
  if (screen is ClearableScreen) {
    screen.clear();
    return;
  }
  fill(screen, null);
}