setSquareState method

void setSquareState({
  1. Piece? newState,
})

Implementation

void setSquareState({Piece? newState}) {
  value = value.copyWith(squareState: newState);
  notifyListeners();
}