writeScoped method
Like addScoped
but writes the current indentation level.
Implementation
void writeScoped(
String? begin,
String end,
Function func, {
bool addTrailingNewline = true,
}) {
assert(begin != '' || end != '',
'Use nest for indentation without any decoration');
addScoped(str() + (begin ?? ''), end, func,
addTrailingNewline: addTrailingNewline);
}