Skip to content

Commit b671f8e

Browse files
authored
FIX: startAt value not valid (#6)
Using data key to start at instead
1 parent cdc8fca commit b671f8e

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
@@ -190,7 +190,7 @@ class _RealtimeDBPaginationState extends State<RealtimeDBPagination> {
190190
final docsLimit = _data.length + (getMore ? widget.limit : 0);
191191
var docsQuery = widget.query.limitToFirst(docsLimit);
192192
if (_data.isNotEmpty) {
193-
docsQuery = docsQuery.startAt(_data.first);
193+
docsQuery = docsQuery.startAt(null, key: _data.first.key);
194194
}
195195

196196
_streamSub = docsQuery.onValue.listen((DatabaseEvent snapshot) async {

0 commit comments

Comments
 (0)