-
Notifications
You must be signed in to change notification settings - Fork 27.2k
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
Container() suddenly requires a positional argument #26275
Comments
Correct! :-D Thank you! This somehow happened:
|
Perhaps the IDE you are using is not protecting from modifying SDK source. |
I'm closing this issue because your problem is solved and there are other issues for related problems. |
I'm using VisualStudio Code:
it seems this happens often :-) |
@DanTup can this be caused by accidental modifications from within the IDE? |
Yes. Previously this has occurred because the server could generate quick-fixes that modifies the Flutter SDK if you wrote the code incorrectly: This is fixed as part of dart-lang/sdk#35402.
We can't prevent them but we do show a warning if you manually modify a file outside of your workspace. It wouldn't have caught this though, as the change was made programatically from the quick-fix. Hopefully once the fix rolls out these sorts of issues will stop (in the meantime, running |
@DanTup thanks a lot for the update! |
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'm going through a flutter tutorial, in one moment the parts of my project that haven't been touched (
git status
confirms it) started flashing red in Visual Studio Code becauseContainer
started to need a positional argument - I thought it might be an IDE error, butflutter run
from an independent console gave the same results.The exact moment when it all broke down I was working on the next lecture in which I added this: https://gist.github.com/bbozo/ade0662a222089117754b901a2096f4b - the new code didn't work, but also the old code had errors reported in it too.
I did
git stash
locally to revert the new changes, went through steps to clear cache (went through commands in #17937 and https://github.com/flutter/flutter/wiki/Workarounds-for-common-issues#corrupted-cache ) but theContainer()
calls in the old code all now require a positional argument.flutter run
&flutter doctor
outputs are here: https://gist.github.com/bbozo/54a7d75bb342aeed56bdbce651e262beI'm stuck :-)
The text was updated successfully, but these errors were encountered: