hitTestAt method

List<HitTestElementEntry> hitTestAt(
  1. int x,
  2. int y
)

Performs a hit-test at terminal coordinates (x, y) against the render tree and returns the list of hit elements, deepest first.

Implementation

List<HitTestElementEntry> hitTestAt(int x, int y) {
  _ensureRunning();
  // Make sure offsets are current by accessing the model's view.
  final model = _program!.currentModel!;
  model.view();
  return model.hitTestAt(x.toDouble(), y.toDouble());
}