isEolChar property

bool get isEolChar

True if the string has 1 character and it's a CR or LF.

Implementation

bool get isEolChar {
  return codeUnits.length == 1 && lineEnding.contains(codeUnitAt(0));
}