isEnterKey static method

bool isEnterKey(
  1. String char
)

check if character matches carriage return

Implementation

static bool isEnterKey(String char) {
  return char.codeUnitAt(0) == 13 ||
      char == '\n' ||
      char == '\r' ||
      char == '\r\n';
}