getWidgetGlobalToLocal method
Get the coordinates of the widget on the screen.Widgets must be rendered completely. 获取widget在屏幕上的坐标,widget必须渲染完成
Implementation
Offset getWidgetGlobalToLocal(
{Offset point = Offset.zero, RenderObject? ancestor}) {
final RenderBox? box = getRenderBox;
return box == null
? Offset.zero
: box.globalToLocal(point, ancestor: ancestor);
}