PersonalInfoNotifier
profile/personal_info_provider.dart · AsyncNotifier
Overview
AsyncNotifier wrapping /store/customers/me/personal-info. Loaded once on first read; refreshPersonalInfo re-fetches. Consumed by header widgets that need just the name/photo slice.
User Flow
- build() awaits loadPersonalInfo.
- loadPersonalInfo sets AsyncValue.loading then calls UserService.getPersonalInfo.
- refreshPersonalInfo is a thin wrapper used by pull-to-refresh on the profile tab.
Cases & Edge Cases
- Errors are captured as AsyncValue.error and returned as null — the screen renders shimmer + retry state.
- Not autoDispose — the cached personal info is reused across the whole app lifetime.
Code References
- lib/src/features/shared/profile/personal_info_provider.dart:19 // PersonalInfoNotifier
- lib/src/features/shared/profile/personal_info_provider.dart:54 // personalInfoProvider
API Calls
Empty — fill this in later. Open the manifest and add content here.
Notes
Both this and CustomerProfileNotifier exist intentionally — different cache lifetimes for different consumers.