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