Clean leaky test. (#149199)

Introduced by https://github.com/flutter/flutter/pull/149006

To repro run:

`flutter test /Users/polinach/_/flutter_dev/packages/flutter/test/material/text_button_test.dart --dart-define LEAK_TR`

<img width="268" alt="Screenshot 2024-05-28 at 11 50 33 AM" src="https://github.com/flutter/flutter/assets/12115586/c1a1bf5e-4df4-4819-b897-b09021d3a07a">
This commit is contained in:
Polina Cherkasova
2024-05-28 16:06:10 -07:00
committed by GitHub
parent df64ca0b11
commit c109b3cb02

View File

@@ -2303,6 +2303,7 @@ void main() {
testWidgets('treats a hovering stylus like a mouse', (WidgetTester tester) async {
final FocusNode focusNode = FocusNode();
addTearDown(focusNode.dispose);
final ThemeData theme = ThemeData(useMaterial3: true);
bool hasBeenHovered = false;