Skip to content

Commit

Permalink
Implement RenderEditable.computeDryBaseline (#147911)
Browse files Browse the repository at this point in the history
Missed `RenderEditable` so flutter/flutter#146224 is failing in google3
  • Loading branch information
LongCatIsLooong authored May 7, 2024
1 parent 74356f3 commit f20c853
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/flutter/lib/src/rendering/editable.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2302,6 +2302,15 @@ class RenderEditable extends RenderBox with RelayoutWhenSystemFontsChangeMixin,
return Size(width, constraints.constrainHeight(_preferredHeight(constraints.maxWidth)));
}

@override
double computeDryBaseline(covariant BoxConstraints constraints, TextBaseline baseline) {
final (double minWidth, double maxWidth) = _adjustConstraints(minWidth: constraints.minWidth, maxWidth: constraints.maxWidth);
_textIntrinsics
..setPlaceholderDimensions(layoutInlineChildren(constraints.maxWidth, ChildLayoutHelper.dryLayoutChild, ChildLayoutHelper.getDryBaseline))
..layout(minWidth: minWidth, maxWidth: maxWidth);
return _textIntrinsics.computeDistanceToActualBaseline(baseline);
}

@override
void performLayout() {
final BoxConstraints constraints = this.constraints;
Expand Down

0 comments on commit f20c853

Please sign in to comment.