query method

List<T> query(
  1. Rectangle<num> range
)

Implementation

List<T> query(Rectangle range) {
  if (_children.isEmpty) {
    return _items
        .where((item) => range.containsPoint(item.point))
        .map((item) => item.item)
        .toList();
  }
  return _children
      .where((child) => child.intersects(range))
      .expand((child) => child.query(range))
      .toList();
}