From c85fa6abf4ffe253109bc5cac762e46d1853d325 Mon Sep 17 00:00:00 2001 From: Polina Cherkasova Date: Wed, 29 May 2024 08:41:18 -0700 Subject: [PATCH] Clean leak in editable_text_test.dart. (#149223) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Introduced by https://github.com/flutter/flutter/pull/149042 Screenshot 2024-05-28 at 6 25 22 PM --- packages/flutter/test/widgets/editable_text_test.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/flutter/test/widgets/editable_text_test.dart b/packages/flutter/test/widgets/editable_text_test.dart index 9afa7100a433..83616e89d863 100644 --- a/packages/flutter/test/widgets/editable_text_test.dart +++ b/packages/flutter/test/widgets/editable_text_test.dart @@ -17656,6 +17656,8 @@ void main() { }); testWidgets('Can implement TextEditingController', (WidgetTester tester) async { + final _TextEditingControllerImpl controller = _TextEditingControllerImpl(); + addTearDown(controller.dispose); await tester.pumpWidget( MediaQuery( data: const MediaQueryData(), @@ -17664,7 +17666,7 @@ void main() { child: EditableText( autofocus: true, backgroundCursorColor: Colors.grey, - controller: _TextEditingControllerImpl(), + controller: controller, focusNode: focusNode, style: textStyle, cursorColor: cursorColor,