intrinsic_dimension library

A widget that offers the dimensions (width and height) and the start offset of the widget you return from a builder callback function.