arch-atlas

SellersState

providers/sellers_provider.dart

domain

Overview

All-in-one state holding the full fetched sellers list, the filtered subset shown for the current query, the local search history, pagination cursors (offset/limit/totalCount/hasMoreData), and isLoading + isLoadingMore + searchQuery + error.

User Flow

  1. Empty default — actual content arrives via SellersNotifier.fetchSellers + loadHistory.
  2. copyWith re-uses the standard ?? pattern; error is pass-through so passing null clears it.
  3. filteredSellers is recomputed by _applyLocalFilter every time the underlying sellers list or query changes.

Cases & Edge Cases

  • Empty filteredSellers + non-empty searchQuery = 'no results for query'.
  • Empty filteredSellers + empty searchQuery = 'show recent history' (by design).
  • hasMoreData=false stops both manual loadMore and the fetchAllSellers loop.

Code References

  • lib/src/features/shared/search/providers/sellers_provider.dart:9 // SellersState

API Calls

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

Notes

Two separate loading flags exist so the loadMore spinner doesn't replace the existing list with a full-screen loader.