endAt method

Query endAt(
  1. DocumentSnapshot snapshot
)

Creates and returns a new Query that ends before 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 end this query before, in order of the query's order by. @return The created Query. Creates and returns a new Query that ends at the provided document (inclusive). 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 at. @return The created Query.

Implementation

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

/// Creates and returns a new Query that ends at the provided document
/// (inclusive). 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 at.
/// @return The created Query.
external Query endAt(DocumentSnapshot snapshot);