String mimeType

The MIME type of the data URI.

A data URI consists of a "media type" followed by data. The media type starts with a MIME type and can be followed by extra parameters.

Example:

data:text/plain;charset=utf-8,Hello%20World!

This data URI has the media type text/plain;charset=utf-8, which is the MIME type text/plain with the parameter charset with value utf-8. See RFC 2045 for more detail.

If the first part of the data URI is empty, it defaults to text/plain.

Source

String get mimeType {
  int start = _separatorIndices[0] + 1;
  int end = _separatorIndices[1];
  if (start == end) return "text/plain";
  return _Uri._uriDecode(_text, start, end, UTF8, false);
}