isPageRequestedFor method
Checks if the page for the given messageIndex
is already requested.
Note that the messageIndex
is expected to be based on
full messageSequence
, where index 0 is newest message and
size-1
is the oldest message.
Implementation
bool isPageRequestedFor(int messageIndex) {
final index = length - messageIndex - 1;
return index >
length - (pagedSequence.currentPageIndex * pagedSequence.pageSize);
}