Skip to content

Commit 88632f7

Browse files
authored
FIX: endBefore value not valid (#8)
Using data key to end before instead
1 parent ce52582 commit 88632f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/src/realtime_db_pagination.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ class _RealtimeDBPaginationState extends State<RealtimeDBPagination> {
234234

235235
var latestDocQuery = widget.query.limitToFirst(1);
236236
if (_data.isNotEmpty) {
237-
latestDocQuery = latestDocQuery.endBefore(_data.first);
237+
latestDocQuery = latestDocQuery.endBefore(null, key: _data.first.key);
238238
}
239239

240240
_liveStreamSub = latestDocQuery.onValue.listen(

0 commit comments

Comments
 (0)