add method

void add(
  1. T item,
  2. Mappoint position
)

Adds a render item to the spatial index.

item Render item to add to the index

Implementation

void add(T item, Mappoint position) {
  final cell = _getCell(position);
  _grid.putIfAbsent(cell, () => <T>[]).add(item);
}