BoundingClientRect constructor

BoundingClientRect(
  1. RenderBox renderBox
)

Implementation

BoundingClientRect(RenderBox renderBox) {
  final size = renderBox.size;
  final position = renderBox.localToGlobal(const Offset(0, 0));
  dx = position.dx.toInt();
  dy = position.dy.toInt();
  width = size.width.toInt();
  height = size.height.toInt();
  top = dy;
  right = dx + width;
  bottom = dy + height;
  left = dx;
}