MimeTypes class

A namespace class to expose mime type specific features

Constructors

MimeTypes()

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited

Static Methods

ofFile(File file) String
Returns mime type of file based on its extension

Constants

avi → const String
"video/avi"
binary → const String
mime type for binary
'application/octet-stream'
bmp → const String
"image/bmp"
css → const String
Mime type for CSS
"text/css"
dart → const String
Mime type for Dart
"application/dart"
flv → const String
"video/x-flv"
fromFileExtension → const Map<String, String>
Map of file extension to mime type
const <String, String>{"html" : html, "js" : javascript, "css" : css, "dart" : dart, "png" : png, "jpg" : jpeg, "jpeg" : jpe…
gif → const String
Mime type for GIF
"image/gif"
gp3 → const String
"video/3gpp"
html → const String
Mime type for HTML
"text/html"
javascript → const String
Mime type for Javascript
"application/javascript"
jpeg → const String
Mime type for JPEG
"image/jpeg"
json → const String
Mime type for JSON
"application/json"
mov → const String
"video/quicktime"
mp3 → const String
"audio/mpeg3"
mp4 → const String
"video/mp4"
multipartForm → const String
Mime type for multipart form data
'multipart/form-data'
pdf → const String
"application/pdf"
png → const String
Mime type for PNG
"image/png"
rar → const String
"application/x-rar-compressed"
svg → const String
Mime type for SVG
"image/svg+xml"
tar → const String
"application/x-tar"
txt → const String
"text/plain"
urlEncodedForm → const String
Mime type form-urlencoded
'application/x-www-form-urlencoded'
wav → const String
"video/wav"
webm → const String
"video/webm"
webp → const String
"image/webp"
zip → const String
"application/zip"