addLine method

void addLine(
  1. String? single, {
  2. String? separator,
})

Implementation

void addLine(String? single, {String? separator}) {
  if (single == null || single == "") return;
  if (_currentLine.length + single.length + (separator?.length ?? 0) >
      lineLength) {
    if (_currentLine.isNotEmpty) _results.add(_currentLine);
    _currentLine = single;
  } else {
    _currentLine += (separator ?? "") + single;
  }
}