layout method

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

Implementation

@override
void layout(BoxConstraints constraints) {
  super.layout(constraints);
  final content = _viewToString(_paintDelegate());
  _lastPaint = content;
  final width = Layout.getWidth(content).toDouble();
  final height = Layout.getHeight(content).toDouble();
  size = constraints.constrain(Size(width, height));
}