ChatAdapter class abstract
Base interface for chat backend adapters.
Implement this to connect the chat package to your backend. Use HttpChatAdapter or SocketChatAdapter as a starting point if your backend is transport-specific.
- Implemented types
- Implementers
Constructors
Properties
-
connectionState
→ Stream<
ChatConnectionState> -
no setterinherited
-
eventStream
→ Stream<
ChatEvent> -
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- isConnected → bool
-
Whether the adapter is currently connected.
no setter
- name → String
-
Adapter name for logging.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addParticipants(
String conversationId, List< String> userIds) → Future<void> -
inherited
-
addReaction(
String messageId, String emoji) → Future< void> -
inherited
-
archiveConversation(
String conversationId) → Future< void> -
inherited
-
connect(
) → Future< void> -
inherited
-
createConversation(
CreateConversationParams params) → Future< Conversation> -
inherited
-
deleteConversation(
String conversationId) → Future< void> -
inherited
-
deleteMessage(
String conversationId, String messageId) → Future< void> -
inherited
-
disconnect(
) → Future< void> -
inherited
-
dispose(
) → Future< void> - Dispose adapter resources.
-
getConversation(
String conversationId) → Future< Conversation?> -
inherited
-
getPendingRequests(
String conversationId) → Future< List< Participant> > -
inherited
-
getPinnedMessages(
String conversationId) → Future< List< Message> > -
inherited
-
getPresence(
String userId) → Future< PresenceResult> -
inherited
-
inherited
-
getStarredMessages(
) → Future< List< Message> > -
inherited
-
getStarredMessagesByConversation(
String conversationId) → Future< List< Message> > -
inherited
-
incrementalSync(
String sinceToken) → Future< SyncResult> -
inherited
-
initialize(
) → Future< void> - Initialize the adapter (called once at startup).
-
initialSync(
) → Future< SyncResult> -
inherited
-
joinConversation(
JoinConversationParams params) → Future< Conversation> -
inherited
-
loadMessages(
String conversationId, {String? before, int? limit}) → Future< LoadMessagesResult> -
inherited
-
markAsRead(
String conversationId, String messageId) → Future< void> -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pinMessage(
String conversationId, String messageId, Duration? duration) → Future< void> -
inherited
-
removeParticipant(
String conversationId, String userId) → Future< void> -
inherited
-
removeReaction(
String messageId, String reactionId) → Future< void> -
inherited
-
sendMessage(
SendMessageParams params) → Future< Message> -
inherited
-
sendTyping(
String conversationId, bool isTyping) → Future< void> -
inherited
-
starMessage(
String conversationId, String messageId) → Future< String> -
inherited
-
startHeartbeat(
String userId, Duration interval) → void - Start presence heartbeat. Override in socket-based adapters.
-
stopHeartbeat(
) → void - Stop presence heartbeat. Override in socket-based adapters.
-
subscribePresence(
String userId) → Future< void> -
inherited
-
syncConversation(
String conversationId) → Future< SyncResult> -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
unarchiveConversation(
String conversationId) → Future< void> -
inherited
-
unpinMessage(
String conversationId, String messageId) → Future< void> -
inherited
-
unstarMessage(
String messageId) → Future< void> -
inherited
-
unsubscribePresence(
String userId) → Future< void> -
inherited
-
updateConversation(
String conversationId, UpdateConversationParams params) → Future< Conversation> -
inherited
-
updateParticipantStatus(
String conversationId, String userId, ParticipantStatus status) → Future< void> -
inherited
-
uploadFile(
UploadFileParams params) → Stream< FileUploadProgress> -
inherited
-
validateConversationCode(
String code) → Future< bool> -
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited