From c9ec26ee29ab0ed845c90dcac958ad18883d8351 Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Wed, 23 Oct 2019 18:11:47 -0700 Subject: [PATCH] Revert "[Chip] Make sure InkResponse is in the foreground on delete for chips with background color (#41463)" (#43391) This reverts commit 588275e179379c957c4b7acf5cea1d2d1f2d6ce0. --- packages/flutter/lib/src/material/chip.dart | 3 +- .../lib/src/widgets/layout_builder.dart | 5 --- packages/flutter/test/material/chip_test.dart | 29 --------------- .../test/widgets/layout_builder_test.dart | 36 ------------------- 4 files changed, 1 insertion(+), 72 deletions(-) diff --git a/packages/flutter/lib/src/material/chip.dart b/packages/flutter/lib/src/material/chip.dart index e682ed0c4c..0fd49b8f39 100644 --- a/packages/flutter/lib/src/material/chip.dart +++ b/packages/flutter/lib/src/material/chip.dart @@ -15,7 +15,6 @@ import 'constants.dart'; import 'debug.dart'; import 'feedback.dart'; import 'icons.dart'; -import 'ink_decoration.dart'; import 'ink_well.dart'; import 'material.dart'; import 'material_localizations.dart'; @@ -1814,7 +1813,7 @@ class _RawChipState extends State with TickerProviderStateMixin[selectController, enableController]), builder: (BuildContext context, Widget child) { - return Ink( + return Container( decoration: ShapeDecoration( shape: shape, color: getBackgroundColor(chipTheme), diff --git a/packages/flutter/lib/src/widgets/layout_builder.dart b/packages/flutter/lib/src/widgets/layout_builder.dart index e9e8c5da42..4a6c83b6e9 100644 --- a/packages/flutter/lib/src/widgets/layout_builder.dart +++ b/packages/flutter/lib/src/widgets/layout_builder.dart @@ -235,11 +235,6 @@ class _RenderLayoutBuilder extends RenderBox with RenderObjectWithChildMixin [0, 0, 0]); }); - - testWidgets('LayoutBuilder calculates baseline from child', (WidgetTester tester) async { - await tester.pumpWidget( - Directionality( - textDirection: TextDirection.ltr, - child: Row( - crossAxisAlignment: CrossAxisAlignment.baseline, - textBaseline: TextBaseline.alphabetic, - children: [ - LayoutBuilder( - builder: (BuildContext context, BoxConstraints constraints) { - return const Text('First', style: TextStyle(fontSize: 10)); - }, - ), - LayoutBuilder( - builder: (BuildContext context, BoxConstraints constraints) { - return const Text('Second', style: TextStyle(fontSize: 30)); - }, - ), - ], - ), - ), - ); - - // The Ahem font extends 0.2 * fontSize below the baseline. - // So the two row elements line up like this: - // - // First Second - // ------------- baseline - // 2 6 space below the baseline = 0.2 * fontSize - // ------------- widget text dy values - - final double firstTextDy = tester.getBottomLeft(find.text('First')).dy; - final double secondTextDy = tester.getBottomLeft(find.text('Second')).dy; - expect(firstTextDy, closeTo(secondTextDy - 4.0, 0.001)); - }, skip: isBrowser); }