getCharacter method

  1. @override
String getCharacter(
  1. int x,
  2. int y
)
override

Gets the character at (x, y). Returns a space if coordinates are out of bounds.

Implementation

@override
String getCharacter(int x, int y) {
  if (x < 0 || x >= bounds.width || y < 0 || y >= bounds.height) return ' ';
  return parent.getCharacter(bounds.x + x, bounds.y + y);
}