Customer Profile Model
manage-profile/customer_profile_response.dart + request.dart
Overview
CustomerProfileResponse mirrors /store/customers/me — id, first_name, last_name, email, phone, addresses, metadata. CustomerProfileRequest is the partial update payload posted by the manage-profile screen.
User Flow
- fromJson is tolerant to missing fields — every field optional except id.
- Edit screens construct a CustomerProfileRequest with only the changed fields.
- Response is consumed by ProfileDetailsPage, header widgets, and the address picker for cart shipping defaults.
Cases & Edge Cases
- Metadata is a free-form map — used for client-side flags like 'has uploaded avatar this session'.
- Phone is optional — backend rejects updates that empty out a previously-set phone, so request omits the field entirely.
Code References
- lib/src/features/shared/manage-profile/customer_profile_response.dart
- lib/src/features/shared/manage-profile/customer_profile_request.dart
- lib/src/features/shared/manage-profile/cutomser_details_model.dart
API Calls
Empty — fill this in later. Open the manifest and add content here.
Notes
The cutomser_details_model.dart filename is a typo — kept as-is to avoid breaking imports.