Add Prestation Wizard
add-prestation/add-prestation.dart
Overview
3-step wizard (Informations → Options & Tarifs → Disponibilités). 2723 lines of UI orchestrating the most complex create flow in the app. Submits via the add-prestation controller's 4-6-call pipeline.
User Flow
- Step 1: title, description, thumbnail picker (uploadPublicFile), currency, category + sub-category (vendorProductCategoriesProvider + vendorSubCategoriesProvider).
- Step 2: dynamic options + variants table with per-variant price.
- Step 3: working hours per day, exceptions, slot duration, address (Geoapify autocomplete → reverseGeocode for lat/lng), and the cancellation policy block.
- Submit calls the controller's pipeline; success pops back to /services.
Cases & Edge Cases
- Thumbnail upload happens immediately on selection — a failed upload keeps the user on step 1 without proceeding.
- Step 3 location uses GeoapifyService — without an API key, the address picker is text-only and the submit fails server-side.
- Policy fields are pre-filled with sensible defaults (deposit=20%, delay=72h) so a hurried seller can ship without touching them.
Code References
- lib/src/features/seller/add-prestation/add-prestation.dart
- lib/src/features/seller/add-prestation/thumbnail.dart
- lib/src/features/seller/add-prestation/model/add_prestation_model.dart
API Calls
Empty — fill this in later. Open the manifest and add content here.
Notes
The CLAUDE.md in this folder is the canonical multi-call create flow — read before changing the submit order.