getCursorData method
Implementation
@override
void getCursorData(MongoReplyMessage replyMessage) {
if (firstBatch) {
firstBatch = false;
var cursorMap =
replyMessage.documents?.first['cursor'] as Map<String, dynamic>?;
if (cursorMap != null) {
cursorId = cursorMap['id'] as int;
final firstBatch = cursorMap['firstBatch'] as List;
items.addAll(List.from(firstBatch));
}
} else {
super.getCursorData(replyMessage);
}
}