layout method
Implementation
@override
void layout(BoxConstraints constraints) {
super.layout(constraints);
final width = Layout.getWidth(text).toDouble();
final height = Layout.getHeight(text).toDouble();
size = constraints.constrain(Size(width, height));
}