Conversation class

Constructors

Conversation.new(String sid)
Conversation.fromMap(Map<String, dynamic> map)
Construct from a map.
factory

Properties

attributes Attributes?
getter/setter pair
createdBy String?
getter/setter pair
dateCreated DateTime?
getter/setter pair
dateUpdated DateTime?
getter/setter pair
friendlyName String?
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
hasMessages bool
no setter
lastMessageDate DateTime?
no setter
lastMessageIndex int?
no setter
lastReadMessageIndex int?
no setter
onMessageAdded Stream<Message>
Called when a Message is added to the conversation the current user is subscribed to.
getter/setter pair
onMessageDeleted Stream<Message>
Called when a Message is deleted from the conversation the current user is subscribed to.
getter/setter pair
onMessageUpdated Stream<MessageUpdatedEvent>
Called when a Message is changed in the conversation the current user is subscribed to.
getter/setter pair
onParticipantAdded Stream<Participant>
Called when a Participant is added to the conversation the current user is subscribed to.
getter/setter pair
onParticipantDeleted Stream<Participant>
Called when a Participant is deleted from the conversation the current user is subscribed to.
getter/setter pair
onParticipantUpdated Stream<ParticipantUpdatedEvent>
Called when a Participant is changed in the conversation the current user is subscribed to.
getter/setter pair
onSynchronizationChanged Stream<Conversation>
Called when conversation synchronization status changed.
getter/setter pair
onTypingEnded Stream<TypingEvent>
Called when an Participant stops typing in a Conversation.
getter/setter pair
onTypingStarted Stream<TypingEvent>
Called when an Participant starts typing in a Conversation.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sid String
final
status ConversationStatus
getter/setter pair
synchronizationStatus ConversationSynchronizationStatus
getter/setter pair
uniqueName String?
getter/setter pair

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

Operators

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