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:
co-authored by
Claude Sonnet 4.6
parent
eb63a3e415
commit
28511491af
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user