TransientMessage class

Represents a temporary or transient message within the chat.

Android Reference: com.cometchat.chat.models.TransientMessage

This class includes properties that encapsulate details of a non-persistent chat message, including the receiverId, receiverType, data, and sender.

Constructors

TransientMessage({required String receiverId, required String receiverType, required Map<String, dynamic> data, User? sender})
Constructs a new TransientMessage instance.

Properties

data Map<String, dynamic>
Custom data payload.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
receiverId String
ID of the receiver (user or group).
getter/setter pair
receiverType String
Type of receiver ("user" or "group").
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sender User?
The user who sent the transient message.
getter/setter pair

Methods

copyWith({String? receiverId, String? receiverType, Map<String, dynamic>? data, User? sender}) TransientMessage
Creates a copy of this TransientMessage with the given fields replaced.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Generates a map representing the TransientMessage.
toString() String
Generates a string representation of the TransientMessage.
override

Operators

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