Seller Detail Provider
providers/seller_detail_provider.dart
Overview
FutureProvider.family keyed by handle that fetches /store/seller/{handle} (full profile + products + reviews) for the SellerDetailScreen.
User Flow
- ref.watch(sellerDetailProvider(handle)) on the detail screen.
- Provider hits /store/seller/{handle} and returns the typed Seller-detail map.
- Family entry stays cached unless invalidated — back-and-forth navigation is instant.
Cases & Edge Cases
- Handle conflict (two sellers with the same handle) is a backend bug — client falls back to the first match.
- 404 returns a typed error inside AsyncValue.error which the screen renders as 'Seller not found'.
Code References
- lib/src/features/shared/search/providers/seller_detail_provider.dart
API Calls
Empty — fill this in later. Open the manifest and add content here.
Notes
ref.invalidate(sellerDetailProvider(handle)) after a follow/unfollow to force a re-fetch with the updated followers count.