testGlobalToLocal method

dynamic testGlobalToLocal(
  1. double x,
  2. double y
)

Implementation

dynamic testGlobalToLocal(double x, double y) {
  if (!isRendererAttached) {
    return { 'x': 0, 'y': 0 };
  }

  Offset offset = Offset(x, y);
  Offset result = renderBoxModel!.globalToLocal(offset);
  return {'x': result.dx, 'y': result.dy};
}