BaseMessageCollection class abstract

The base message collection that handles message lists. @since 4.0.3

Implementers

Constructors

BaseMessageCollection({required BaseChannel channel, required MessageListParams params, required BaseMessageCollectionHandler handler, required int startingPoint, required Chat chat})

Properties

baseChannel BaseChannel
getter/setter pair
baseHandler BaseMessageCollectionHandler
no setter
chat → Chat
no setter
collectionId String
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 pair
hasPrevious bool
Whether there's more data to load in previous (oldest) direction.
getter/setter pair
isDisposed bool
Whether this collection is disposed.
no setter
isInitialized bool
Whether initialize method is called.
no setter
isLoading bool
Whether this collection is loading.
no setter
latestMessage RootMessage?
no setter
latestSyncedTimestamp int?
no setter
loadNextParams MessageListParams
no setter
loadPreviousParams MessageListParams
no setter
messageList List<RootMessage>
The list of succeeded message list in this collection.
no setter
oldestMessage RootMessage?
no setter
oldestSyncedTimestamp int?
no setter
params MessageListParams
The MessageListParams.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
startingPoint int
The starting point of the collection.
no setter

Methods

canAddMessage(CollectionEventSource eventSource, RootMessage addedMessage) bool
canUpdateMessage(CollectionEventSource eventSource, RootMessage originalMessage, RootMessage updatedMessage) bool
dispose() → void
Disposes current MessageCollection and stops all events from being received.
initialize() Future<void>
Initializes this collection from startingPoint.
loadNext() Future<void>
Loads next (latest direction) message lists.
loadPrevious() Future<void>
Loads previous (oldest direction) message lists.
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
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resetMyHistory({required String channelUrl, int? messageOffsetTimestamp}) Future<void>
setValuesFromMessageList() → void
sort() → void
toString() String
A string representation of this object.
inherited

Operators

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