Position posOf(int index) { final x = index % area.width + area.x; final y = index ~/ area.width + area.y; return Position(x, y); }