getPointer method
dynamic
getPointer(
- dynamic event
Implementation
getPointer(event) {
final RenderBox renderBox = domKey.currentContext!.findRenderObject();
final size = renderBox.size;
var rect = size;
int left = 0;
int top = 0;
var x = (event.clientX - left) / rect.width * 2 - 1;
var y = -(event.clientY - top) / rect.height * 2 + 1;
var button = event.button;
return Pointer(x, y, button);
}