stepCurrentLine method Null safety

void stepCurrentLine(
  1. int sign
)

Implementation

void stepCurrentLine(int sign) {
  int line = currentLine + sign;
  if (line < 0) {
    currentLine = lines;
  } else if (line > lines) {
    currentLine = 0;
  } else {
    currentLine = line;
  }
}