orderBy method

QueryReference orderBy(
  1. String fieldPath, {
  2. bool descending = false,
})

Returns CollectionReference that's additionally sorted by the specified fieldPath.

The field is a String representing a single field name. After a CollectionReference order by call, you cannot add any more orderBy calls.

Implementation

QueryReference orderBy(String fieldPath, {bool descending = false}) =>
    QueryReference(gateway, path).orderBy(fieldPath, descending: descending);