parse method

ContentType parse(String value)

Creates a new content type object from parsing a Content-Type header value. As primary type, sub type and parameter names and values are not case sensitive all these values will be converted to lower case. Parsing this string

text/html; charset=utf-8

will create a content type object with primary type text, sub type html and parameter charset with value utf-8.

Source

static ContentType parse(String value) {
  return _ContentType.parse(value);
}

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/1.24.3/dart-io/ContentType/parse.html