-
Notifications
You must be signed in to change notification settings - Fork 27.5k
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
Hot Reload error? #7551
Comments
@Hixie is there a way to make the framework recover from the user error? |
We could add try/catch blocks in even more places to try to keep the badness contained. But fundamentally it's always possible to get the framework into an inconsistent state if you throw half-way through a frame or pointer event handling, and then you have to restart. If we have specific cases of bad code causing hot reload to fail, I'm happy to look at them and see if in those specific cases we can improve matters. |
@Reagankm Did the analyzer not warn you that your code contained errors? |
It's trivial to write code that the analyzer is happy with but which will freak the framework out. |
@johnmccutchan I didn't see any such warning, but I'm running the code from google3 so don't have access to the "flutter analyze" command. Maybe there's some other way I'm supposed to be checking that. |
I'm not sure what to do in response to this bug. If there is a specific case you think we should handle better, please file a new bug with specific steps. |
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 |
Steps to Reproduce
I was trying to assign a Navigator.pushNamed action to an InkWell's onTap and I initially did it wrong, writing:
new InkWell(onTap: Navigator.pushNamed(context, NavigationRoutes.insertionOrderList),
When I tapped the item in my emulator, I got an error, as I should.
Then, realizing my mistake, I changed my code to
new InkWell(onTap: () {Navigator.pushNamed(context, NavigationRoutes.insertionOrderList);}
and I hit 'r' in the console to do a hot reload. This gave me the following error:
When I just canceled the run, though, and rebuilt from scratch it builds and works correctly.
Maybe this is related to issue 4891? I don't know, that's just the only thing I found when trying to search for my error message.
The text was updated successfully, but these errors were encountered: