arch-atlas

Search Screen

features/shared/search/search.dart

presentation

Overview

Full-screen search UI: text field at top, recent-history chips, seller results grid below, pull-to-refresh, near-bottom load-more. Pushed from Home with a slide-from-bottom transition.

User Flow

  1. On open, ref.watches sellersProvider and renders history strip + empty search state.
  2. Each keystroke calls sellersNotifier.search(query) — local filter is instant; first-time fetch is awaited.
  3. Result tap calls addToHistory(seller) and context.push(/seller/:handle).
  4. Long-press on history chip → removeFromHistory.
  5. Clear-all button on history strip calls clearHistory.

Cases & Edge Cases

  • Auto-focus is intentional; users land in the search field immediately on screen open.
  • Empty-query + empty history renders an illustration 'No recent searches'.
  • Loading-more spinner is footer-anchored, not full-screen, so existing rows stay visible.

Code References

  • lib/src/features/shared/search/search.dart
  • lib/src/features/shared/search/widgets/seller_card.dart

API Calls

Empty — fill this in later. Open the manifest and add content here.

Notes

Page is wrapped in a PageStorageKey('search_page') so scroll position survives the back/forward push.