startAfter method
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.
fieldValues the field values to start this query after, in order of the query's order by.
Returns the created Query. Throws an ArgumentError in the cases described in startAt.
final QuerySnapshot<Map<String, Object?>> snapshot = await firestore
.collection('cities')
.orderBy('population')
.startAfter([1000000])
.get();
Implementation
Query<T> startAfter(Iterable<Object?> fieldValues) {
final Bound bound = _builder.boundFromFields(
query,
'startAfter',
fieldValues.toList(),
inclusive: false,
);
return _withQuery(query.startAt(bound));
}