indentBlock function
Indents each line of input by spaces spaces.
Implementation
String indentBlock(String input, int spaces) {
final prefix = ' ' * spaces;
return input
.split('\n')
.map((line) => line.isEmpty ? line : '$prefix$line')
.join('\n');
}