diff --git a/lib/widgets/note_search_delegate.dart b/lib/widgets/note_search_delegate.dart index 8b969590..2ff624f1 100644 --- a/lib/widgets/note_search_delegate.dart +++ b/lib/widgets/note_search_delegate.dart @@ -31,7 +31,11 @@ class NoteSearchDelegate extends SearchDelegate { IconButton( icon: Icon(Icons.close), onPressed: () { - query = ''; + if (query.isEmpty) { + close(context, null); + } else { + query = ''; + } }, ), ];