endBeforeDocument method

Query endBeforeDocument(
  1. DocumentSnapshot documentSnapshot
)

Creates and returns a new Query that ends before the provided document snapshot (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.

Calling this method will replace any existing cursor "end" query modifiers.

Implementation

Query endBeforeDocument(DocumentSnapshot documentSnapshot) {
  Map<String, dynamic> results = _assertQueryCursorSnapshot(documentSnapshot);
  return Query._(firestore,
      _delegate.endBeforeDocument(results['orders'], results['values']));
}