Fix pro state not updating after submit: use context.watch for AuthProvider

context.read doesn't subscribe to changes, so the form stayed visible
after submitForReview even though AuthProvider was updated.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Lizandro Guarnizo
2026-06-28 17:27:12 -05:00
co-authored by Claude Sonnet 4.6
parent eb63a3e415
commit 28511491af
+1 -1
View File
@@ -151,7 +151,7 @@ class _FormBodyState extends State<_FormBody> {
Widget build(BuildContext context) {
final isDark = context.watch<ThemeProvider>().isDark;
final fp = context.watch<ProfessionalFormProvider>();
final user = context.read<AuthProvider>().user!;
final user = context.watch<AuthProvider>().user!;
final professions = context.watch<ProfessionsProvider>().professions;
final proStateInt = enumToInt(user.proState);