Constrain _RenderScaledInlineWidget child size in computeDryLayout (#131765)
This commit is contained in:
parent
7de053b2b8
commit
55044a605f
@ -385,7 +385,7 @@ class _RenderScaledInlineWidget extends RenderBox with RenderObjectWithChildMixi
|
||||
Size computeDryLayout(BoxConstraints constraints) {
|
||||
assert(!constraints.hasBoundedHeight);
|
||||
final Size unscaledSize = child?.computeDryLayout(BoxConstraints(maxWidth: constraints.maxWidth / scale)) ?? Size.zero;
|
||||
return unscaledSize * scale;
|
||||
return constraints.constrain(unscaledSize * scale);
|
||||
}
|
||||
|
||||
@override
|
||||
|
@ -273,8 +273,8 @@ void main() {
|
||||
textDirection: TextDirection.ltr,
|
||||
child: Center(
|
||||
child: SizedBox(
|
||||
width: 100.3,
|
||||
child: Text.rich(WidgetSpan(child: Row()), textScaleFactor: 0.3),
|
||||
width: 502.5454545454545,
|
||||
child: Text.rich(WidgetSpan(child: Row()), textScaleFactor: 0.95),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
Loading…
x
Reference in New Issue
Block a user