QuadTree<E> constructor

QuadTree<E>({
  1. required int level,
  2. required Rect bounds,
})

Creates a new QuadTree with the specified level and bounds

level - The depth of this quadrant (0 = root) bounds - The rectangular boundary of this quadrant

Implementation

QuadTree({
  required this.level,
  required this.bounds,
})  : assert(level >= 0, 'Level must be non-negative'),
      assert(bounds.width > 0 && bounds.height > 0,
          'Bounds must have positive dimensions') {
  _nodes = <Node<E>>[];
}