writeAllIndented method

void writeAllIndented(
  1. Iterable objects, [
  2. String separator = "",
  3. int indentFactor = 1
])

Same as writeAll, but prepends indent to every value from objects.

Implementation

void writeAllIndented(
  Iterable<dynamic> objects, [
  String separator = "",
  int indentFactor = 1,
]) {
  var i = 0;
  final length = objects.length;

  for (final item in objects) {
    _writeIndent(indentFactor);
    write(item);
    if (i < length - 1) {
      write(separator);
    }

    i++;
  }
}