-
Notifications
You must be signed in to change notification settings - Fork 801
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Null check operator error in _LoginCardState._submit #468
Labels
bug
Something isn't working
Comments
vargab95
added a commit
to vargab95/flutter_login
that referenced
this issue
Nov 28, 2023
…null check crashes Fixes NearHuscarl#468
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
I've enable Firebase Crashlytics in my android app which detected a failed null check. My guess is that,
await _submitController.reverse();
is called in an async gap and when it is called, the widget is not mounted anymore.In my opinion the fix would be to check whether the context is still mounted before calling _submitController.reverse(), like the following.
To Reproduce
Steps to reproduce the behavior:
You may have to repeat it a few times as pushing the back button have to take place in exactly the right moment, however I could reproduce it several times with the described method.
Expected behavior
Do not crash on the null check.
Information (please complete the following information):
The text was updated successfully, but these errors were encountered: