render method Null safety

String render(
  1. [StringBuffer? buffer]
)

Implementation

String render([StringBuffer? buffer]) {
  buffer ??= StringBuffer();
  buffer.write(dispositionText);
  renderField('filename', filename, true, buffer);
  renderDateField('creation-date', creationDate, buffer);
  renderDateField('modification-date', modificationDate, buffer);
  renderDateField('read-date', readDate, buffer);
  if (size != null) {
    renderField('size', size.toString(), false, buffer);
  }
  renderRemainingFields(buffer, exclude: [
    'filename',
    'creation-date',
    'modification-date',
    'read-date',
    'size'
  ]);
  return buffer.toString();
}