fix: professional profile not loading or saving correctly
- Fix typo aditional_address -> additional_address in toDocument() and fromDocument() - Clear ProfessionalFormProvider before fetch in initState() so TextFormField initialValue always applies to fresh data - Add clear() to ProfessionalFormProvider; call it on logout to avoid leaking data between users Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
732da2e475
commit
b31ff13657
@@ -49,6 +49,7 @@ class _ProfessionalProfileViewState extends State<ProfessionalProfileView> {
|
||||
final pfp = Provider.of<ProfileFormProvider>(context, listen: false);
|
||||
final fp = Provider.of<ProfessionalFormProvider>(context, listen: false);
|
||||
pfp.user = auth.user;
|
||||
fp.clear(); // force spinner so TextFormField initialValue applies to fresh data
|
||||
Provider.of<ProfessionalProvider>(context, listen: false)
|
||||
.getProfessional(auth.user!.id)
|
||||
.then(fp.setProfesional);
|
||||
|
||||
Reference in New Issue
Block a user