mirror of
https://github.com/flutter/flutter.git
synced 2026-02-06 11:48:36 +08:00
fix typo in computeMaxIntrinsicWidth implementation (#69812)
This commit is contained in:
parent
b26970b143
commit
319722997c
@ -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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user