removeLastLineIfNeeded method

void removeLastLineIfNeeded()

Implementation

void removeLastLineIfNeeded() {
  if (_sealed) {
    throw StateError(
        'Cannot be removed the Element at ${_lines.length - 1} when $runtimeType is sealed');
  }
  if (last != null) {
    if (last!.isEmpty) {
      _lines.removeLast();
    }
  }
}