Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
c9f70e9f
Unverified
Commit
c9f70e9f
authored
Sep 05, 2023
by
Polina Cherkasova
Committed by
GitHub
Sep 05, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
_SearchBarState should dispose FocusNode, if it created it. (#133947)
parent
7cdf314d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
search_anchor.dart
packages/flutter/lib/src/material/search_anchor.dart
+3
-0
search_anchor_test.dart
packages/flutter/test/material/search_anchor_test.dart
+2
-1
No files found.
packages/flutter/lib/src/material/search_anchor.dart
View file @
c9f70e9f
...
...
@@ -1179,6 +1179,9 @@ class _SearchBarState extends State<SearchBar> {
@override
void
dispose
()
{
_internalStatesController
.
dispose
();
if
(
widget
.
focusNode
==
null
)
{
_focusNode
.
dispose
();
}
super
.
dispose
();
}
...
...
packages/flutter/test/material/search_anchor_test.dart
View file @
c9f70e9f
...
...
@@ -6,9 +6,10 @@ import 'dart:ui';
import
'package:flutter/material.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
import
'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart'
;
void
main
(
)
{
testWidgets
(
'SearchBar defaults'
,
(
WidgetTester
tester
)
async
{
testWidgets
WithLeakTracking
(
'SearchBar defaults'
,
(
WidgetTester
tester
)
async
{
final
ThemeData
theme
=
ThemeData
(
useMaterial3:
true
);
final
ColorScheme
colorScheme
=
theme
.
colorScheme
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment