isAdjacentFile function Null safety

bool isAdjacentFile(
  1. String columnName,
  2. String isAdjacent
)

function to check if character is adjacent to another character

Implementation

bool isAdjacentFile(String columnName, String isAdjacent) {
  return (columnName.contains(
          String.fromCharCode((isAdjacent[0][0]).codeUnitAt(0) - 1)) ||
      columnName
          .contains(String.fromCharCode((isAdjacent[0][0]).codeUnitAt(0) + 1)));
}