Skip to content

dart code suggestions aren't working after v2.1.1 update #38729

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

Open
waleedf112 opened this issue Oct 5, 2019 · 10 comments
Open

dart code suggestions aren't working after v2.1.1 update #38729

waleedf112 opened this issue Oct 5, 2019 · 10 comments
Labels
area-devexp For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages. devexp-completion Issues with the analysis server's code completion feature P3 A lower priority bug or feature request type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@waleedf112
Copy link

waleedf112 commented Oct 5, 2019

i didn't write any flutter/dart 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.

after trying for 6 hours and trying almost every version of dart and flutter, i figured out a 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 writing code, you will lose all the features that were introduced after the 2.1.1 update, and you can't build the app or run it or even make updates to the packages.

i've tried different PCs (4 of them, plus a VM machine) Windows and Mac, and different IDEs (Android Studio, Vscode, intellij), they all have the same problem.

screenshot of it working fine when pressing ctrl+space on:

Container( alignment: // <<< Pressing Ctrl+Space here )

another screenshot after the v2.1.1 update:


@vsmenon vsmenon added the legacy-area-analyzer Use area-devexp instead. label Oct 6, 2019
@pq pq added the devexp-completion Issues with the analysis server's code completion feature label Jan 22, 2020
@srawlins
Copy link
Member

Dart Code suggestions have been working for a while again. I suspect this can be closed.

@waleedf112
Copy link
Author

Dart Code suggestions have been working for a while again. I suspect this can be closed.

it's still not working even with the latest flutter update.
the only workaround i found is this:
#38739

@srawlins
Copy link
Member

Ah, interesting, apologies.

@srawlins srawlins added the P3 A lower priority bug or feature request label Nov 10, 2020
@bwilkerson
Copy link
Member

I expect that this has been fixed by now as a result of having a tighter integration between the Dart SDK and Flutter SDK. If I'm wrong I'll be happy to re-open this issue.

@waleedf112
Copy link
Author

I expect that this has been fixed by now as a result of having a tighter integration between the Dart SDK and Flutter SDK. If I'm wrong I'll be happy to re-open this issue.

not really, the only workaround is this:
#38739 (comment)

and it only works on vscode with Flutter 1.20.4

@bwilkerson
Copy link
Member

Does code completion work correctly in Flutter 1.22.5?

@waleedf112
Copy link
Author

waleedf112 commented Jan 23, 2021

Does code completion work correctly in Flutter 1.22.5?

unfortunately, it doesn't

image

I can't remember the latest version that works with the defaults. but for the workaround, the latest version that works is 1.20.4:

image

@bwilkerson
Copy link
Member

Thanks for testing it.

@bwilkerson bwilkerson reopened this Jan 23, 2021
@waleedf112
Copy link
Author

@waleedf112
Copy link
Author

for anyone who stumbles upon this issue, check this out:
#38739 (comment)

@srawlins srawlins added the type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) label Nov 17, 2021
@bwilkerson bwilkerson added area-devexp For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages. and removed legacy-area-analyzer Use area-devexp instead. labels Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-devexp For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages. devexp-completion Issues with the analysis server's code completion feature P3 A lower priority bug or feature request type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

5 participants