layout method

  1. @override
void layout(
  1. BoxConstraints constraints
)
override

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));
}