screenToGrid method

(int, int) screenToGrid(
  1. double x,
  2. double y
)

Implementation

@pragma('vm:prefer-inline')
(int, int) screenToGrid(double x, double y) => ((x / cellSize).floor(), (y / cellSize).floor());