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