MediaType enum

The type of media content attached to a message.

Inheritance
Available extensions

Values

text → const MediaType

Regular text message — no media attachment.

const MediaType(0)
image → const MediaType

Image attachment (JPEG, PNG, WebP, GIF, etc.).

const MediaType(1)
video → const MediaType

Video attachment (MP4, WebM, etc.).

const MediaType(2)
audio → const MediaType

Audio attachment (voice note, MP3, OGG, etc.).

const MediaType(3)
file → const MediaType

Generic file attachment (PDF, ZIP, document, etc.).

const MediaType(4)

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
isMedia bool
Whether this type represents a media attachment (anything except text).
no setter
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
supportsThumbnail bool
Whether this type supports thumbnail generation.
no setter
value int
Integer value stored in the Drift database.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

fromValue(int value) MediaType
Deserialize from the integer stored in the database.

Constants

values → const List<MediaType>
A constant List of the values in this enum, in order of their declaration.