flutter / flutter/flutter-intellij
dart code suggestions aren't working after v2.1.1 update
- Dominant language
- Java
- Stars
- 2k
- Forks
- 356
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 27
Description
i didn't write any flutter code for a long time, when i came back i had a really annoying problem and it is slowing me down.
the code completion/suggestions (when hitting ctrl+space) is working fine, except when i want to see suggestions for a property of a widget.
i can't remember the specific update that messes this up, but when i go to download an older version of flutter, it seems the last working update is v1.0.0, after that the problem appears.
i've tried different PCs and IDEs, they all have the same problem.
screenshot of it working when pressing ctrl+space on:
`Container(
alignment: // <<< Pressing Ctrl+Space here
)`

another screenshot after the v1.0.0 update:

____________________
**UPDATE: after trying for 6 hours, i figured out a workaround and knew the cause of the problem.**
**you have to download the latest version of Flutter SDK. and the dart SDK version 2.1.1 from (https://dart.dev/tools/sdk/archive)**
and only take two files:
First file: `dart-sdk\bin\dart.exe` and copy it to `Flutter\bin\cache\dart-sdk\bin`
Second file: `dart-sdk\bin\snapshots\analysis_server.dart.snapshot` and copy it to `Flutter\bin\cache\dart-sdk\bin\snapshots`
it's not a great solution but at least it works for now, you will lose all the features that were introduced after the 2.1.1 update.
## Steps to Reproduce
1. install flutter after v1.0.0 update (or the latest).
2. write a Container widget with "alignment" property.
3. press Ctrl + Space to auto-complete the code for the "alignment".
```
[√] Flutter (Channel stable, v1.7.8+hotfix.4, on Microsoft Windows [Version 10.0.18362.356], locale en-US)
• Flutter version 1.7.8+hotfix.4 at C:\DevelopingFolder\flutter_windows_v1.7.8+hotfix.4-stable\flutter
• Framework revision 20e59316b8 (3 months ago), 2019-07-18 20:04:33 -0700
• Engine revision fee001c93f
• Dart version 2.4.0
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at C:\Users\walee\AppData\Local\Android\sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.2
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
• All Android licenses accepted.
[√] Android Studio (version 3.5)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 40.0.2
• Dart plugin version 191.8423
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
[!] Android Studio (version 3.6)
• Android Studio at D:\Waleed-PC\Desktop\android-studio
• Flutter plugin version 39.0.5
• Dart plugin version 192.6262.58
X Unable to find bundled Java version.
• Try updating or re-installing Android Studio.
[√] VS Code (version 1.38.1)
• VS Code at C:\Users\walee\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.4.1
[!] Connected device
! No devices available
! Doctor found issues in 2 categories.
Process finished with exit code 0
```
Contributor guide
Assessment
This issue has not been assessed yet.