AudioMessage class abstract

A class that represents audio message.

Inheritance
Annotations
  • @JsonSerializable()
  • @immutable

Constructors

AudioMessage({required User author, int? createdAt, required Duration duration, required String id, Map<String, dynamic>? metadata, String? mimeType, required String name, String? remoteId, Message? repliedMessage, String? roomId, bool? showStatus, required num size, Status? status, MessageType? type, int? updatedAt, required String uri, List<double>? waveForm})
const
factory
AudioMessage.fromJson(Map<String, dynamic> json)
Creates an audio message from a map (decoded JSON).
factory
AudioMessage.fromPartial({required User author, int? createdAt, required String id, required PartialAudio partialAudio, String? remoteId, String? roomId, bool? showStatus, Status? status, int? updatedAt})
Creates a full audio message from a partial one.
factory

Properties

author User
User who sent this message.
finalinherited
createdAt int?
Created message timestamp, in ms.
finalinherited
duration Duration
The length of the audio.
final
hashCode int
The hash code for this object.
no setterinherited
id String
Unique ID of the message.
finalinherited
metadata Map<String, dynamic>?
Additional custom metadata or attributes related to the message.
finalinherited
mimeType String?
Media type of the audio file.
final
name String
The name of the audio.
final
props List<Object?>
Equatable props.
no setter
remoteId String?
Unique ID of the message received from the backend.
finalinherited
repliedMessage Message?
Message that is being replied to with the current message.
finalinherited
roomId String?
ID of the room where this message is sent.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showStatus bool?
Show status or not.
finalinherited
size num
Size of the audio in bytes.
final
status Status?
Message Status.
finalinherited
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited
type MessageType
MessageType.
finalinherited
updatedAt int?
Updated message timestamp, in ms.
finalinherited
uri String
The audio file source (either a remote URL or a local resource).
final
waveForm List<double>?
Wave form represented as a list of decibel levels.
final

Methods

copyWith({User? author, int? createdAt, Duration? duration, String? id, Map<String, dynamic>? metadata, String? mimeType, String? name, String? remoteId, Message? repliedMessage, String? roomId, bool? showStatus, num? size, Status? status, int? updatedAt, String? uri, List<double>? waveForm}) Message
Creates a copy of the message with an updated data.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts an audio message to the map representation, encodable to JSON.
override
toString() String
A string representation of this object.
inherited

Operators

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