updateSquares method
Auxiliar function that updates all the squares states.
Implementation
void updateSquares() {
BoardData board = BoardData();
for (int i = 0; i < 8; i++) {
for (int j = 0; j < 8; j++) {
if (board.boardMovements[i][j]) {
board.boardMovements[i][j] = false;
board.squares[i * 8 + j].setState(() {});
}
}
}
}