writeMap method
Implementation
void writeMap(String key, ObjectWriteDelegate delegate) {
_writeEntry(key, () {
newline(); // Maps begin on the line after the key
final mapWriter =
YamlMapWriter(destination: _sink, indentation: _indentation + 2);
try {
delegate(mapWriter);
return !mapWriter._hasWritten;
} finally {
mapWriter._disposed = true;
}
});
}