File tree 2 files changed +9
-9
lines changed
2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -298,12 +298,12 @@ class _SupaEmailAuthState extends State<SupaEmailAuth> {
298
298
redirectTo: widget.redirectTo,
299
299
);
300
300
widget.onPasswordResetEmailSent? .call ();
301
- if (mounted) {
302
- context.showSnackBar (localization.passwordResetSent) ;
303
- setState (() {
304
- _forgotPassword = false ;
305
- }) ;
306
- }
301
+ // FIX use_build_context_synchronously
302
+ if ( ! context.mounted) return ;
303
+ context. showSnackBar (localization.passwordResetSent);
304
+ setState (() {
305
+ _forgotPassword = false ;
306
+ });
307
307
} on AuthException catch (error) {
308
308
widget.onError? .call (error);
309
309
} catch (error) {
Original file line number Diff line number Diff line change @@ -78,9 +78,9 @@ class _SupaResetPasswordState extends State<SupaResetPassword> {
78
78
),
79
79
);
80
80
widget.onSuccess.call (response);
81
- if (mounted) {
82
- context.showSnackBar (localization.passwordResetSent) ;
83
- }
81
+ // FIX use_build_context_synchronously
82
+ if ( ! context.mounted) return ;
83
+ context. showSnackBar (localization.passwordResetSent);
84
84
} on AuthException catch (error) {
85
85
if (widget.onError == null && context.mounted) {
86
86
context.showErrorSnackBar (error.message);
You can’t perform that action at this time.
0 commit comments