endBeforeDocument method
Implementation
QueryBuilder endBeforeDocument(Map<String, dynamic> document) {
_data = _data.takeWhile((doc) {
for (int i = 0; i < doc.length; i++) {
try {
var field = doc.keys.elementAtOrNull(i);
var a = doc[field];
var b = document[field];
if (a != null && b != null) {
if (a.compareTo(b) < 0) return true;
if (a.compareTo(b) > 0) return false;
}
} catch (_) {}
}
return false;
}).toList();
return QueryBuilder(List.from(_data), this);
}