from method Null safety

ContentTypeHeader from(
  1. MediaType mediaType,
  2. {String? charset,
  3. String? boundary,
  4. bool? isFlowedFormat}
)

Implementation

static ContentTypeHeader from(MediaType mediaType,
    {String? charset, String? boundary, bool? isFlowedFormat}) {
  final type = ContentTypeHeader(mediaType.text);
  type.charset = charset;
  type.boundary = boundary;
  type.isFlowedFormat = isFlowedFormat;
  return type;
}