Message class abstract
Base class for all messages exchanged between server and client.
Constructors
- Message.new(MessageTypeValue type, String documentId)
-
Constructor
const
- Message.change({required String documentId, required Change change})
-
Create a change message
factory
-
Message.documentStatus({required String documentId, required Snapshot? snapshot, required List<
Change> ? changes}) -
Create a document status message
factory
-
Message.documentStatusRequest({required String documentId, required Set<
OperationId> version}) -
Create a document status request message
factory
- Message.error({required String documentId, required String code, required String message})
-
Create an error message
factory
- Message.ping({required String documentId, required int timestamp})
-
Create a ping message
factory
- Message.pong({required String documentId, required int originalTimestamp, required int responseTimestamp})
-
Create a pong message
factory
Properties
- documentId → String
-
The document ID to which the message refers
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → MessageTypeValue
-
The message type
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
serialize(
) → String - Serialize the message to a JSON string
-
toJson(
) → Map< String, dynamic> - Convert the message to a JSON map
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited