feat: replace custom search TextField with Flutter SearchBar widget

SearchBar is always visible in the AppBar bottom slot — no toggle needed.
Removed _isSearching, manual debounce timer, and slide animation.
SearchController listener clears results when text is emptied.
Updated E2E and widget tests for the new widget tree.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Thomas Güttler
2026-04-27 08:04:20 +02:00
co-authored by Claude Sonnet 4.6
parent 2b260edb52
commit 65c75c365a
5 changed files with 76 additions and 101 deletions
-27
View File
@@ -17,30 +17,3 @@ Git repo should not contain unknown files.
Then commit.
## Tasks
How can I edit Sieve Scripts? Afaik this feature was added.
---
Replace the custom TextField-in-AppBar search implementation in
lib/ui/screens/email_list_screen.dart with Flutter's built-in SearchBar / SearchAnchor widget
(Flutter 3.x).
Goals:
Remove the _isSearching bool, the _searchController, the slide animation, and the manual Timer
debounce
Use SearchAnchor + SearchBar to drive the _searchQuery state that filters the email list
Keep the existing filter logic untouched — just replace the input mechanism
The search bar should live in the AppBar area; if SearchAnchor doesn't fit cleanly there, use
SearchBar standalone with onChanged (no debounce needed — let the user control submit, or accept
instant filter)
Preserve all existing AppBar actions (compose, sync, settings) when search is not active
Update or remove any tests in integration_test/ that relied on the old search widget tree
---