Reputation: 40
I'm facing some problems with my existing Flutter project, which is already being developed for quite some time. I'm not able to upgrade SDK to ver. 1.22 or higher. After such an upgrade whole project is glowing red showing few hundred errors.
I've noticed that probably it's trouble with IDE plugin or SDK itself.
For example: SizeTransition Widget has 5 parameters in it's constructor:
But IDE tells me that there are only 3:
And it shows me that parameter sizeFactor isn't defined. Instead of it, IDE wants me to give Animation parameter.
I believe this is an SDK or IDE plugin issue. I've tried updating plugins in Android Studio and VS Code, but no luck.
It happens on all 1.22 SDK versions and 1.23 also. Flutter doctor shows, that everything is fine:
$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel dev, 1.23.0-4.0.pre, on Microsoft Windows [Version 10.0.18363.1082], locale pl-PL)
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[√] Android Studio (version 4.0)
[√] VS Code (version 1.49.2)
[!] Connected device
! No devices available
! Doctor found issues in 1 category.
Did anyone face that trouble?
Upvotes: 0
Views: 67
Reputation: 42333
This is an open bug in the analysis server. If you haven't fetched packages before creating the analysis server, it may not be using the correct language version (and therefore doesn't understand the new required
keyword).
Once you've fetched packages, running the Reload Window command in VS Code to reload the workspace should resolve the issue (it's fine if the packages were accessible prior to the analysis server starting) until the bug is fixed.
Upvotes: 0