Conversation class
Methods
addParticipantByIdentity (String identity )
→ Future <bool ? >
advanceLastReadMessageIndex (int lastReadMessageIndex )
→ Future <int ? >
Update the last read index for this Participant and Conversation.
Only update the index if the value specified is larger than the previous value.
destroy ()
→ Future <void >
getLastMessages (int count )
→ Future <List <Message > >
getMessageByIndex (int messageIndex )
→ Future <Message >
getMessagesAfter ({required int index , required int count })
→ Future <List <Message > >
Fetch at most count messages including and subsequent to the specified index.
getMessagesBefore ({required int index , required int count })
→ Future <List <Message > >
Fetch at most count messages including and prior to the specified index.
getMessagesCount ()
→ Future <int ? >
getParticipantByIdentity (String identity )
→ Future <Participant ? >
getParticipantBySid (String participantSid )
→ Future <Participant ? >
getParticipantsCount ()
→ Future <int >
From the official (Android) docs:
Fetch the number of participants on this conversation.
Available even if the conversation is not yet synchronized.
This method is semi-realtime. This means that this data will be eventually correct, but will also possibly be incorrect for a few seconds. The Conversations system does not provide real time events for counter values changes.
So this is quite useful for any UI badges, but is not recommended to build any core application logic based on these counters being accurate in real time. This function performs an async call to service to obtain up-to-date message count.
The retrieved value is then cached for 5 seconds so there is no reason to call this function more often than once in 5 seconds.
getParticipantsList ()
→ Future <List <Participant > >
getUnreadMessagesCount ()
→ Future <int >
join ()
→ Future <void >
leave ()
→ Future <void >
messageAdded (MessageData messageData )
→ void
messageDeleted (MessageData messageData )
→ void
messageUpdated (MessageData messageData , String reasonString )
→ void
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
participantAdded (ParticipantData participantData )
→ void
participantDeleted (ParticipantData participantData )
→ void
participantUpdated (ParticipantData participantData , String reasonString )
→ void
removeMessage (Message message )
→ Future <bool >
removeParticipant (Participant participant )
→ Future <bool ? >
removeParticipantByIdentity (String identity )
→ Future <bool ? >
sendMessage (MessageOptions options )
→ Future <Message >
setAllMessagesRead ()
→ Future <int ? >
Mark all messages in conversation as read.
setAllMessagesUnread ()
→ Future <int ? >
Mark all messages in conversation as unread.
setAttributes (Attributes attributes )
→ Future <void >
setFriendlyName (String friendlyName )
→ Future <void >
setLastReadMessageIndex (int lastReadMessageIndex )
→ Future <int ? >
Set the last read index for this Participant and Conversation. Allows you to set any value, including smaller than the current index.
setNotificationLevel (NotificationLevel level )
→ Future <void >
setUniqueName (String uniqueName )
→ Future <void >
synchronizationChanged (ConversationData conversationData )
→ void
toString ()
→ String
A string representation of this object.
inherited
typing ()
→ Future <void >
Indicate that Participant is typing in this conversation.
typingEnded (ConversationData conversationData , ParticipantData participantData )
→ void
typingStarted (ConversationData conversationData , ParticipantData participantData )
→ void
updateFromMap (Map <String , dynamic > map )
→ void
updateFromPigeon (ConversationData conversationData )
→ void