diff --git a/packages/flutter/lib/src/rendering/layer.dart b/packages/flutter/lib/src/rendering/layer.dart index be6d8db69b..1893848336 100644 --- a/packages/flutter/lib/src/rendering/layer.dart +++ b/packages/flutter/lib/src/rendering/layer.dart @@ -1282,13 +1282,6 @@ class OpacityLayer extends ContainerLayer { } } - @override - void applyTransform(Layer child, Matrix4 transform) { - assert(child != null); - assert(transform != null); - transform.translate(offset.dx, offset.dy); - } - @override ui.EngineLayer addToScene(ui.SceneBuilder builder, [ Offset layerOffset = Offset.zero ]) { bool enabled = firstChild != null; // don't add this layer if there's no child diff --git a/packages/flutter/test/material/text_field_test.dart b/packages/flutter/test/material/text_field_test.dart index 4ea45e6009..746449219d 100644 --- a/packages/flutter/test/material/text_field_test.dart +++ b/packages/flutter/test/material/text_field_test.dart @@ -3,7 +3,6 @@ // found in the LICENSE file. import 'dart:async'; -import 'dart:io'; import 'dart:math' as math; import 'dart:ui' as ui show window; @@ -381,58 +380,6 @@ void main() { expect(textField.cursorRadius, const Radius.circular(3.0)); }); - testWidgets('text field selection toolbar renders correctly inside opacity', (WidgetTester tester) async { - await tester.pumpWidget( - MaterialApp( - home: Scaffold( - body: Center( - child: Container( - width: 100, - height: 100, - child: const Opacity( - opacity: 0.5, - child: TextField( - decoration: InputDecoration(hintText: 'Placeholder'), - ), - ), - ), - ), - ), - ), - ); - - await tester.showKeyboard(find.byType(TextField)); - - const String testValue = 'A B C'; - tester.testTextInput.updateEditingValue( - const TextEditingValue( - text: testValue - ) - ); - await tester.pump(); - - // The selectWordsInRange with SelectionChangedCause.tap seems to be needed to show the toolbar. - // (This is true even if we provide selection parameter to the TextEditingValue above.) - final EditableTextState state = tester.state(find.byType(EditableText)); - state.renderEditable.selectWordsInRange(from: const Offset(0, 0), cause: SelectionChangedCause.tap); - - expect(state.showToolbar(), true); - - // This is needed for the AnimatedOpacity to turn from 0 to 1 so the toolbar is visible. - await tester.pump(); - await tester.pump(const Duration(seconds: 1)); - - // Sanity check that the toolbar widget exists. - expect(find.text('PASTE'), findsOneWidget); - - await expectLater( - // The toolbar exists in the Overlay above the MaterialApp. - find.byType(Overlay), - matchesGoldenFile('text_field_opacity_test.0.0.png'), - skip: !Platform.isLinux, - ); - }); - // TODO(hansmuller): restore these tests after the fix for #24876 has landed. /* testWidgets('cursor layout has correct width', (WidgetTester tester) async {