RestTransport class

Implemented types

Constructors

RestTransport({required RestConfig config, required HttpClient http})

Properties

config RestConfig
final
events Stream<TransportEvent>
Real-time event stream from the backend.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
http HttpClient
final
id String
Unique identifier for this adapter (e.g. 'websocket', 'firestore').
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

connect() Future<void>
Opens the connection and starts emitting TransportEvents.
override
deleteMessage(String messageId) Future<DeliveryStatus>
Deletes messageId on the backend.
override
disconnect() Future<void>
Closes the connection cleanly.
override
editMessage(String messageId, Message updated) Future<DeliveryStatus>
Updates updated on the backend. messageId is the local/remote ID of the message to replace.
override
fetchConversation(String id) Future<Conversation>
Loads the full Conversation snapshot at startup.
override
fetchHistory({required String conversationId, DateTime? before, int limit = 50}) Future<List<Message>>
Loads a page of history before before (cursor-based pagination).
override
markRead(String conversationId, DateTime readAt) Future<void>
Marks the conversation as read for the current user at readAt.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reactToMessage(String messageId, String emoji) Future<void>
Toggles an emoji reaction on messageId.
override
sendMessage(Message m) Future<DeliveryStatus>
Sends m to the backend and returns its DeliveryStatus.
override
sendTyping(String conversationId, {bool isTyping = true}) Future<void>
Emits a "typing" indicator. isTyping=false stops it.
override
toString() String
A string representation of this object.
inherited

Operators

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