addScoped method
void
addScoped(})
Scoped increase of the indent level.
For the execution of func
the indentation will be incremented.
Implementation
void addScoped(
String? begin,
String? end,
Function func, {
bool addTrailingNewline = true,
int nestCount = 1,
}) {
assert(begin != '' || end != '',
'Use nest for indentation without any decoration');
if (begin != null) {
_sink.write(begin + newline);
}
nest(nestCount, func);
if (end != null) {
_sink.write(str() + end);
if (addTrailingNewline) {
_sink.write(newline);
}
}
}