endAt method

Query? endAt(
  1. dynamic value, {
  2. String? key,
})

Create a query constrained to only return child nodes with a value less than or equal to the given value, using the given orderBy directive or priority as default, and optionally only child nodes with a key less than or equal to the given key.

Implementation

Query endAt(dynamic value, {String key}) {
  assert(!_parameters.containsKey('endAt'));
  assert(value is String ||
      value is bool ||
      value is double ||
      value is int ||
      value == null);
  final Map<String, dynamic> parameters = <String, dynamic>{'endAt': value};
  if (key != null) parameters['endAtKey'] = key;
  return _copyWithParameters(parameters);
}