layout method

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

Wraps this node's text to fit constraints, then takes its size from the result.

Only the width is honored - text is never squeezed vertically, so a tall enough block overflows its constraints rather than clipping.

Implementation

@override
void layout(LayoutConstraints constraints) {
  if (constraints != _constraints) {
    _constraints = constraints;
    _dirty = true;
  }

  _reflow();
}