getWidgetBounds property
Rect
get
getWidgetBounds
get Widget Bounds (width, height, left, top, right, bottom and so on).Widgets must be rendered completely. 获取widget Rect
Implementation
Rect get getWidgetBounds {
final RenderBox? box = getRenderBox;
return box?.semanticBounds ?? Rect.zero;
}