orderBy abstract method

Query<T> orderBy(
  1. Object field, {
  2. bool descending = false,
})

Creates and returns a new Query that's additionally sorted by the specified field. The field may be a String representing a single field name or a FieldPath.

After a FieldPath.documentId order by call, you cannot add any more orderBy calls.

Furthermore, you may not use orderBy on the FieldPath.documentId field when using startAfterDocument, startAtDocument, endAfterDocument, or endAtDocument because the order by clause on the document id is added by these methods implicitly.

Implementation

Query<T> orderBy(Object field, {bool descending = false});