Unverified Commit e30f9c42 authored by Polina Cherkasova's avatar Polina Cherkasova Committed by GitHub

Revert "_SearchBarState should dispose FocusNode, if it created it." (#134072)

Reverts flutter/flutter#133947 as it causes build failures.
parent e66ec8e0
...@@ -1179,9 +1179,6 @@ class _SearchBarState extends State<SearchBar> { ...@@ -1179,9 +1179,6 @@ class _SearchBarState extends State<SearchBar> {
@override @override
void dispose() { void dispose() {
_internalStatesController.dispose(); _internalStatesController.dispose();
if (widget.focusNode == null) {
_focusNode.dispose();
}
super.dispose(); super.dispose();
} }
......
...@@ -6,10 +6,9 @@ import 'dart:ui'; ...@@ -6,10 +6,9 @@ import 'dart:ui';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
void main() { void main() {
testWidgetsWithLeakTracking('SearchBar defaults', (WidgetTester tester) async { testWidgets('SearchBar defaults', (WidgetTester tester) async {
final ThemeData theme = ThemeData(useMaterial3: true); final ThemeData theme = ThemeData(useMaterial3: true);
final ColorScheme colorScheme = theme.colorScheme; final ColorScheme colorScheme = theme.colorScheme;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment