MediaAvailability enum

The local availability state of a media message's binary file.

Inheritance
Available extensions

Values

notApplicable → const MediaAvailability

No media attached — this is a text-only message. Default for all existing messages.

const MediaAvailability(0)
pendingDownload → const MediaAvailability

Media metadata exists but the binary hasn't been fetched yet. The UI should show the thumbnail + a download indicator.

const MediaAvailability(1)
downloading → const MediaAvailability

Currently being transferred from a peer via sendFilePayload. The UI should show a progress bar.

const MediaAvailability(2)
available → const MediaAvailability

Binary file is available on the local filesystem. The UI can display the full image/video/file.

const MediaAvailability(3)
failed → const MediaAvailability

Transfer failed or source peer is unreachable. The UI should offer a retry button.

const MediaAvailability(4)
manualDownloadRequested → const MediaAvailability

User manually requested download for a large file.

const MediaAvailability(5)

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
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
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) MediaAvailability
Deserialize from the integer stored in the database.

Constants

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