endBefore method

Query endBefore(
  1. DocumentSnapshot snapshot
)

Creates and returns a new Query that starts after the provided fields relative to the order of the query. The order of the field values must match the order of the order by clauses of the query.

@param fieldValues The field values to start this query after, in order of the query's order by. @return The created Query. Creates and returns a new Query that ends 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.

@param snapshot The snapshot of the document to end before. @return The created Query.

Implementation

// TODO: Is this possible in dart?
// startAfter(...fieldValues: any[]): Query<AppModelType, DbModelType>;

/// Creates and returns a new Query that ends 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.
///
/// @param snapshot The snapshot of the document to end before.
/// @return The created Query.
external Query endBefore(DocumentSnapshot snapshot);