onLayoutComplete method
Implementation
void onLayoutComplete(ViewableWidgetModel? model) async
{
if (context == null) return;
var box = context!.findRenderObject() as RenderBox?;
if (box == null) return;
var position = box.localToGlobal(Offset.zero);
var size = box.size;
// set the view width, height and position
if (size.width != viewWidth || size.height != viewHeight || position.dx != viewX || position.dy != viewY)
{
viewWidth = size.width;
viewHeight = size.height;
viewX = position.dx;
viewY = position.dy;
}
}