Flutter UI Walkthrough — Search Results

By Engineering Team•September 26, 2026•4 min read

What the shopper sees

Reached by tapping the Shop screen’s search bar, this screen shows a back-arrow header “Search” and the active query as a filter-style chip (“Classic for Adults”) with a filter icon on the right. Below it, a 2-column results grid, then a “New Arrival Items” promotional banner, then a Top Products row (See All), a New Arrivals row, and a Just For You grid — the same trailing cross-sell pattern the other section screens use, but reached here after an actual search rather than a fixed section.

What the shopper does here

  • Types into the search bar — this only drives a debounced typeahead dropdown (product suggestions + demographic-scoped keyword suggestions like “dress for Women”); it never re-runs the results grid on every keystroke.
  • Taps a dropdown row (a suggestion, a keyword, or the literal “Search for ‘<query>’” row) to actually run the search and repopulate the grid.
  • Taps the filter icon to open the structured filter sheet (category, gender, price range, discount range, variant attributes) and refine the current results.
  • Scrolls the grid — infinite scroll loads more results automatically.
  • Taps a product card to open its Product Detail screen.

How it’s built

SearchView is the same generalized SearchScreenController triad the Top Products/New Arrivals/Flash Sale/Just For You screens use, but constructed with sectionType: null (screenType: 'search') instead of a fixed section type — the one difference that makes controller.filterable true and enables the typeahead search box and filter sheet those other screens omit.

Typing never triggers the results query. onChanged only feeds a REST suggestProducts call (350ms debounce) that populates the dropdown; the paginated GraphQL searchProducts call that repopulates the grid fires only on initial load, on applying a structured filter, or on tapping a dropdown row. This split exists because re-running the full paginated query on every keystroke was firing far more often than the shopper was actually searching — the dropdown-tap-only model matches typeahead UX elsewhere (Amazon, Flipkart), where typing narrows suggestions but the underlying search only re-runs once something is picked.

Search also supports a section-scoped push: tapping a card from one of the Shop screen’s typeahead picks, or a keyword suggestion, navigates here with a keyword pre-filled and (for a demographic-scoped keyword) an auto-applied gender filter, reusing this same screen rather than a separate results view. Once the paginated grid is exhausted, the same config-driven trailing-sections mechanic as the See All screens loads this screen’s own cross-sell set (Top Products, New Arrivals, Just For You) via shopRepository.load(screenType: 'search').

Search Results screen — active query chip, product grid, New Arrival Items banner, and Top Products/New Arrivals/Just For You sections below