MessageCollection class

Collection that handles message lists.

Constructors

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

Properties

channel GroupChannel
The GroupChannel tracked by this MessageCollection.
read-only
handler MessageCollectionHandler
The message collection handler to be used for this MessageCollection.
read-only
hashCode int
The hash code for this object.
read-onlyinherited
hasNext bool
Whether there's more data to load in next (latest) direction.
read / write
hasPrevious bool
Whether there's more data to load in previous (oldest) direction.
read-only
isDisposed bool
Whether this collection is disposed.
read-only
isInitialized bool
Whether initialize method is called.
read-only
isLoading bool
Whether this collection is loading.
read-only
latestMessage BaseMessage?
read-only
loadNextParams MessageListParams
read-only
loadPreviousParams MessageListParams
read-only
messageList List<BaseMessage>
The list of succeeded message list in this collection.
final
params MessageListParams
The MessageListParams.
read-only
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
startingPoint int
The starting point of the collection.
read-only

Methods

canAddMessage(CollectionEventSource eventSource, BaseMessage addedMessage) 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.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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