Filter Models
models/filter_data.dart + filter_sample_data.dart
Overview
FilterSection (label + options[]) and FilterOption (label, id, isSelected). filter_sample_data.dart seeds the default sections (Category / Colors / Size / Brand etc.) that _extractFilters then refines from the live product list.
User Flow
- filterSections seeds the empty state shown before any products load.
- _extractFilters merges live category/color/size values from page 0 into the seed sections.
- Bottom sheets render the FilterSection list and emit selected IDs back to the controller.
Cases & Edge Cases
- Default 'All' Category option (isSelected: true, id: '') is prepended only when categoryMap is non-empty.
- Colors and Size are detected by case-insensitive title contains — fragile if a seller introduces a different option naming.
Code References
- lib/src/features/shared/marketplace/models/filter_data.dart
- lib/src/features/shared/marketplace/models/filter_sample_data.dart
API Calls
Empty — fill this in later. Open the manifest and add content here.
Notes
FilterOption.id is the only payload sent to the server — labels are presentation-only and must not be trusted as identifiers.