addHeader method Null safety

void addHeader(
  1. String name,
  2. String value,
  3. {HeaderEncoding encoding = HeaderEncoding.none}
)

Adds a header with the specified name and value.

Compare MailConventions for common header names. Set encoding to any of the HeaderEncoding formats to encode the header.

Implementation

void addHeader(String name, String value,
    {HeaderEncoding encoding = HeaderEncoding.none}) {
  _part.addHeader(name, value, encoding);
}