MessageCollection class

Message collection that handles message lists.

Inheritance

Constructors

MessageCollection({required GroupChannel channel, required MessageListParams params, required MessageCollectionHandler handler, int? startingPoint, Chat? chat})
Constructor for MessageCollection.

Properties

baseChannel BaseChannel
getter/setter pairinherited
baseHandler BaseMessageCollectionHandler
no setterinherited
channel GroupChannel
The GroupChannel tracked by this MessageCollection.
no setter
chat → Chat
no setterinherited
collectionId String
no setterinherited
handler MessageCollectionHandler
The message collection handler to be used for this MessageCollection.
no setter
hashCode int
The hash code for this object.
no setterinherited
hasNext bool
Whether there's more data to load in next (latest) direction.
getter/setter pairinherited
hasPrevious bool
Whether there's more data to load in previous (oldest) direction.
getter/setter pairinherited
isDisposed bool
Whether this collection is disposed.
no setterinherited
isInitialized bool
Whether initialize method is called.
no setterinherited
isLoading bool
Whether this collection is loading.
no setterinherited
latestMessage RootMessage?
no setterinherited
latestSyncedTimestamp int?
no setterinherited
loadNextParams MessageListParams
no setterinherited
loadPreviousParams MessageListParams
no setterinherited
messageList List<BaseMessage>
The list of succeeded message list in this collection.
final
oldestMessage RootMessage?
no setterinherited
oldestSyncedTimestamp int?
no setterinherited
params MessageListParams
The MessageListParams.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
startingPoint int
The starting point of the collection.
no setterinherited
unmuteTimer Timer?
getter/setter pairinherited

Methods

canAddMessage(CollectionEventSource eventSource, RootMessage addedMessage) bool
inherited
canUpdateMessage(CollectionEventSource eventSource, RootMessage originalMessage, RootMessage updatedMessage) bool
inherited
cleanUp() → void
inherited
dispose() → void
Disposes current MessageCollection and stops all events from being received.
inherited
getFailedMessages() Future<List<BaseMessage>>
Gets all failed messages of this MessageCollection @since 4.2.0
initialize() Future<void>
Initializes this collection from startingPoint.
inherited
loadNext() Future<void>
Loads next (latest direction) message lists.
inherited
loadPrevious() Future<void>
Loads previous (oldest direction) message lists.
inherited
markAsRead(BaseMessageContext context) Future<void>
Sends mark as read to this channel. This method has to be called in MessageCollectionHandler.onMessagesAdded or NotificationCollectionHandler.onMessagesAdded. @since 4.2.0
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
refresh() Future<void>
removeAllFailedMessages() Future<void>
Removes all failed messages of this MessageCollection. @since 4.2.0
removeFailedMessages({required List<BaseMessage> messages}) Future<void>
Removes specific failed messages of this MessageCollection. @since 4.2.0
setUnmuteTimer(int remainingDuration) → void
inherited
setValuesFromMessageList() → void
inherited
sort() → void
inherited
toString() String
A string representation of this object.
inherited
updateMessageOffsetTimestamp({required String channelUrl, required int messageOffsetTimestamp}) Future<void>
inherited

Operators

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