maybeAppend method
Implementation
void maybeAppend(String? value, StringBuffer result) {
if (value != null && value.isNotEmpty) {
// Don't add a newline before the first value
if (result.length > 0) {
result.write('\n');
}
result.write(value);
}
}