ChatService class
<p>ChatService class provides different services for direct chats of the user.</p> <p>Services include:</p> <ul> <li><code>sendMessageToDirectChat</code> - used to send messages.</li> <li><code>getDirectChatsByUserId</code> - used to get all chats by the user.</li> <li><code>getDirectChatMessagesByChatId</code> - used to get all chats of a user with another user.</li> </ul>
Constructors
ChatService ()
Properties
chatListStream → Stream<ChatListTileDataModel>
<span class="feature">read-only</span>
chatMessagesStream → Stream<ChatMessage>
<span class="feature">read-only</span>
chatStream ↔ Stream<QueryResult<Object?>>
<span class="feature">read / write</span>
hashCode → int
The hash code for this object.
<span class="feature">read-only</span><span class="feature">inherited</span>
runtimeType → Type
A representation of the runtime type of the object.
<span class="feature">read-only</span><span class="feature">inherited</span>
Methods
getDirectChatMessagesByChatId(dynamic chatId) Future<void>
This function is used to get all the chat messages of a particular chat by the user.
getDirectChatsByUserId() Future<void>
This function is used to get all the chats by the user.
noSuchMethod(Invocation invocation) dynamic
Invoked when a non-existent method or property is accessed.
<span class="feature">inherited</span>
sendMessageToDirectChat(String chatId, String messageContent) Future<void>
This function is used to send the message in the direct chats.
toString() String
A string representation of this object.
<span class="feature">inherited</span>
Operators
operator ==(Object other) bool
The equality operator.
<span class="feature">inherited</span>