startAt method

Query startAt(
  1. DocumentSnapshot snapshot
)

Creates and returns a new Query instance that applies a field mask to the result and returns only the specified subset of fields. You can specify a list of field paths to return, or use an empty list to only return the references of matching documents.

Queries that contain field masks cannot be listened to via onSnapshot() listeners.

This function returns a new (immutable) instance of the Query (rather than modify the existing instance) to impose the field mask.

@param field The field paths to return. @return The created Query. Creates and returns a new Query that starts at the provided document (inclusive). The starting 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 start after. @return The created Query.

Implementation

// TODO: Is this possible in dart?
// select(...field: (string | FieldPath)[]): Query;

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