render method Null safety

  1. @override
void render(
  1. StringBuffer buffer,
  2. {bool renderHeader = true}
)
override

Renders this mime data.

Optionally set readerHeader to false in case the message header should be skipped.

Implementation

@override
void render(StringBuffer buffer, {bool renderHeader = true}) {
  if (!renderHeader && containsHeader) {
    final text = String.fromCharCodes(_bodyData);
    buffer.write(text);
  } else {
    final text = String.fromCharCodes(data);
    buffer.write(text);
  }
}