endBefore method

QueryBuilder endBefore(
  1. List values
)

Implementation

QueryBuilder endBefore(List<dynamic> values) {
  _data = _data.where((doc) {
    for (int i = 0; i < values.length; i++) {
      try {
        final a = doc.values.elementAtOrNull(i);
        final b = values[i];
        if (a != null && b != null) {
          if (a.compareTo(b) >= 0) return false;
        }
      } catch (_) {}
    }
    return true;
  }).toList();
  return QueryBuilder(List.from(_data), this);
}