orderByChild method

Query? orderByChild(
  1. String? key
)

Generate a view of the data sorted by values of a particular child key.

Intended to be used in combination with startAt, endAt, or equalTo.

Implementation

Query orderByChild(String key) {
  assert(key != null);
  assert(!_parameters.containsKey('orderBy'));
  return _copyWithParameters(
    <String, dynamic>{'orderBy': 'child', 'orderByChildKey': key},
  );
}