Fix stuck loading after save on profile and schedule views
- Remove fp.clear() from profile initState: if profesional is already loaded (e.g. navigating from schedule page) the form renders instantly without a spinner; if null the Consumer already shows the spinner. - Add .catchError() so the spinner always resolves even on API failure. - Remove redundant GET /professionals/me reload inside updateProfesionalProfileInfo: data is already correct from copyProfesionalWith, so the save button no longer waits for an extra round-trip after the PATCH. - Wrap save button in try/finally so _saving always resets to false. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
fd7b57fd35
commit
4698454cfc
@@ -97,11 +97,6 @@ class ProfessionalFormProvider with ChangeNotifier {
|
||||
NotificationsService.showSnackbar('Error al guardar: $e');
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
final data = await _api.get('/professionals/me');
|
||||
profesional = Profesional.fromDocument(data as Map<String, dynamic>);
|
||||
notifyListeners();
|
||||
} catch (_) {}
|
||||
NotificationsService.showSnackbar('Información actualizada');
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user