ContentType constructor

ContentType(
  1. String primaryType,
  2. String subType,
  3. {String? charset,
  4. Map<String, String?> parameters = const {}}
)

Creates a new content type object setting the primary type and sub type. The charset and additional parameters can also be set using charset and parameters. If charset is passed and parameters contains charset as well the passed charset will override the value in parameters. Keys passed in parameters will be converted to lower case. The charset entry, whether passed as charset or in parameters, will have its value converted to lower-case.

Implementation

factory ContentType(String primaryType, String subType,
    {String? charset, Map<String, String?> parameters = const {}}) {
  return _ContentType(primaryType, subType, charset, parameters);
}