RealtimeMessage class

Represents a message or event transmitted over a real-time connection.

Constructors

RealtimeMessage({String? id, required String target, List arguments = const [], DateTime? timestamp, Map<String, dynamic> metadata = const {}})
RealtimeMessage.fromJson(Map<String, dynamic> json)
Factory constructor to construct a RealtimeMessage from a JSON map.
factory

Properties

arguments → List
The list of arguments accompanying the event.
final
hashCode → int
The hash code for this object.
no setterinherited
id → String?
Unique identifier or invocation ID, if available.
final
metadata → Map<String, dynamic>
Optional metadata or headers attached to the message.
final
payload → dynamic
Convenience getter for the primary payload (first element in arguments).
no setter
props → List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
stringify → bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited
target → String
The method or event name (e.g., 'ReceiveMessage', 'UserJoined', 'call:offer').
final
timestamp → DateTime
Timestamp when the message was sent or received.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Converts this message into a JSON-encodable map.
toString() → String
A string representation of this object.
inherited

Operators

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