When measuring an object, does measureAndLayout th...
# compose
k
When measuring an object, does measureAndLayout throw if any other object is measured inside of the call? Or does it only throw if the
same object
is measured twice? If so, does it use some per-object flag to determine if it is measured twice? And if so, does that mean that Compose needs to traverse the hierarchy to reset this flag after everything is drawn so it does not throw immediately in the next measureAndLayout? Assuming it draws like
drawCallback() { root.resetMeasureFlag(); root.measureAndLayout(); root.draw(); }
Since otherwise when drawing, the first frame is drawn fine but the second frame will throw due to the measure flag not being reset in the root object and all of its children, thus the root object thinks it is being measured twice