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
Unhandled Exception: Bad state: No element #47040
Comments
Can you post a runnable code sample that we can just copy and run to see the problem? The code you posted is incomplete. |
Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. Please don't hesitate to comment on the bug if you have any more information for us; we will reopen it right away! |
It might be that you have some ".firstWhere" that never matches and it is never true.. Just add optional parameter to all .firstWhere((a) => a == b, , orElse: () => null) this will allow your function to return null, instead of throwing errors like this. |
Yes, you're right. |
how to fix this error. need help I/flutter ( 1548): https://youtu.be/_2xZ71BodIk |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
I get this error when start my app on both real android device and emulator as well (ios version seems to be free of this error, at least on simulator).
flutter doctor --v
Related custom code is:
Everything seems working correctly,
just want to understand what is the reason and how to fix this.
The text was updated successfully, but these errors were encountered: