indent function

Iterable<String> indent(
  1. Iterable<String> lines, [
  2. int depth = 1
])

Implementation

Iterable<String> indent(Iterable<String> lines, [int depth = 1]) {
  final indent = '  ' * depth;
  return lines.map((line) => '$indent$line');
}