MediaData class abstract

Base class for media data that refers to a media file on the local device.

Holds the file name and path (from FileData) and the timestamps of when the recording started and stopped. See AudioMedia, VideoMedia and ImageMedia.

Inheritance
  • Object
  • Serializable
  • Data
  • FileData
  • MediaData
Implementers

Constructors

MediaData({required String filename, required MediaType mediaType, DateTime? startRecordingTime, DateTime? endRecordingTime})

Properties

$type ↔ String?
The type name written to __type in JSON; set to jsonType on creation.
getter/setter pairinherited
dataType → DataType
The type of this data as a DataType.
no setterinherited
endRecordingTime ↔ DateTime?
The timestamp for end of recording, if available.
getter/setter pair
filename ↔ String
The name of the attached file.
getter/setter pairinherited
fromJsonFunction → Function
The generated function that converts a JSON map to an object of this type.
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
id ↔ String
A unique id of this media file, generated as a UUID on creation.
getter/setter pair
jsonType → String
The __type used for JSON serialization of this class.
no setterinherited
mediaType ↔ MediaType
The type of media.
getter/setter pair
metadata ↔ Map<String, String>?
Metadata for this file as a map of string key-value pairs.
getter/setter pairinherited
path ↔ String?
The local path to the attached file on the phone where it is sampled. This is used by e.g. a data manager to get and manage the file on the phone.
getter/setter pairinherited
recordId → String?
Stable identifier of the source record, if available; null by default.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
startRecordingTime ↔ DateTime?
The timestamp for start of recording, if available.
getter/setter pair
upload ↔ bool
Whether to upload the file too, or only this metadata. Default is true.
getter/setter pairinherited

Methods

equivalentTo(Data other) → bool
Is this data equivalent to other?
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Returns a JSON map of this object, including the __type property.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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