Unverified Commit 31972299 authored by LongCatIsLooong's avatar LongCatIsLooong Committed by GitHub

fix typo in computeMaxIntrinsicWidth implementation (#69812)

parent b26970b1
......@@ -2488,7 +2488,7 @@ class _RenderChip extends RenderBox {
@override
double computeMaxIntrinsicWidth(double height) {
final double overallPadding = theme.padding.vertical +
final double overallPadding = theme.padding.horizontal +
theme.labelPadding.horizontal;
return overallPadding +
_maxWidth(avatar, height) +
......
......@@ -2916,6 +2916,18 @@ void main() {
await tapGesture.up();
});
testWidgets('intrinsicHeight implementation meets constraints', (WidgetTester tester) async {
// Regression text for https://github.com/flutter/flutter/issues/49478.
await tester.pumpWidget(_wrapForChip(
child: const Chip(
label: Text('text'),
padding: EdgeInsets.symmetric(horizontal: 20),
),
));
expect(tester.takeException(), isNull);
});
}
class _MaterialStateOutlinedBorder extends StadiumBorder implements MaterialStateOutlinedBorder {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment