Skip to content

Commit 0dee1bf

Browse files
m-1226FlutLab.io
authored andcommitted
move the dispose function of seachview to the top
1 parent 4116e53 commit 0dee1bf

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

‎lib/views/search_view.dart‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ class SearchNoteView extends StatefulWidget {
1212
}
1313

1414
class _SearchNoteViewState extends State<SearchNoteView> {
15+
@override
16+
void dispose() {
17+
searchController.dispose();
18+
super.dispose();
19+
}
20+
1521
final TextEditingController searchController = TextEditingController();
1622
List<NoteModel> finalSearchResults = []; // Store search results here
1723

@@ -92,10 +98,4 @@ class _SearchNoteViewState extends State<SearchNoteView> {
9298
),
9399
);
94100
}
95-
96-
@override
97-
void dispose() {
98-
searchController.dispose();
99-
super.dispose();
100-
}
101101
}

0 commit comments

Comments
 (0)