MimeType class Viam SDK

Mime types supported by Viam

Constructors

MimeType.unsupported(String _name)
An unsupported MimeType. Takes in the String representation of the mimetype that is not supported.
const

Properties

hashCode int
The hash code for this object.
no setteroverride
name String
The name of the MimeType, e.g. 'image/jpeg' If the MimeType is not supported, then this name is the string of the unsupported MimeType.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type String
The underlying type, e.g. 'jpeg', 'png', 'pcd'. If the MimeType is not supported, then this type is the string 'unsupported'.
no setter

Methods

decode(List<int> bytes) Image?
Decode the bytes into an img.Image using the appropriate decoder
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(covariant MimeType other) bool
The equality operator.
override

Static Properties

jpeg MimeType
JPEG encoding (image/jpeg)
no setter
pcd MimeType
PointCloud Data encoding (pointcloud/pcd)
no setter
png MimeType
PNG encoding (image/png)
no setter
viamRgba MimeType
Viam's custom RGBA encoding (image/vnd.viam.rgba)
no setter

Static Methods

fromString(String mimeType) MimeType
Create a MimeType from its string representation. Returns MimeType.unsupported if the provided string is not supported
isSupported(String mimeType) bool
Whether the provided String representation of a MimeType is supported