handleResize method

dynamic handleResize()

Implementation

handleResize() {
  RenderBox getBox = listenableKey.currentContext?.findRenderObject() as RenderBox;
  var size = getBox.size;
  var local = getBox.globalToLocal(Offset(0, 0));

  screen['left'] = local.dx;
  screen['top'] = local.dy;
  screen['width'] = size.width;
  screen['height'] = size.height;

  // var box = scope.domElement.getBoundingClientRect();
  // adjustments come from similar code in the jquery offset() function
  // var d = scope.domElement.ownerDocument.documentElement;
  // scope.screen.left = box.left + window.pageXOffset - d.clientLeft;
  // scope.screen.top = box.top + window.pageYOffset - d.clientTop;
  // scope.screen.width = box.width;
  // scope.screen.height = box.height;
}