addLines function

void addLines(
  1. Indent indent,
  2. Iterable<String> lines, {
  3. String? linePrefix,
})

Adds the lines to indent.

Implementation

void addLines(Indent indent, Iterable<String> lines, {String? linePrefix}) {
  final String prefix = linePrefix ?? '';
  for (final String line in lines) {
    indent.writeln(line.isNotEmpty ? '$prefix$line' : prefix.trimRight());
  }
}