endBefore method

Query<QueryJsImpl> endBefore({
  1. DocumentSnapshot? snapshot,
  2. List? fieldValues,
})

Creates a new Query where the results end before the provided document (exclusive). The end position is relative to the order of the query. The document must contain all of the fields provided in the orderBy of this query.

The DocumentSnapshot parameter is the snapshot of the document you want the query to end before. Or the list of fieldValues to end this query before, in order of the query's order by.

Returns non-null created Query.

Implementation

Query endBefore({DocumentSnapshot? snapshot, List<dynamic>? fieldValues}) =>
    Query.fromJsObject(
        _wrapPaginatingFunctionCall('endBefore', snapshot, fieldValues));