Flutter autocomplete context unaware suggestions

Viewed 195

Setup: Win11, Flutter 2.8.1 • channel stable, Dart 2.15.1, Android Studio 2020.3.1, IntelliJ IDEA 2021.3 (Ultimate Edition)

Flutter/Dart autocomplete gives a suggestion list that is initially populated with completely unrelated entries that push any useful suggestions much further down. Here is an example from the default flutter project where the required argument for mainAxisAlignment is of type MainAxisAlignment:

enter image description here

The suggestions above are generated by ctrl+space, ctrl+alt+space gives no suggestions.

I spent hours searching for a solution and trying everything mentioned with no improvements so far. I get the same autocomplete results on both Android Studio & IntelliJ IDEA. Any idea how to fix the quality of autocompletion?

Flutter doctor results (the one reported issue is supposedly harmless):

[√] Flutter (Channel stable, 2.8.1, on Microsoft Windows [Version 10.0.22000.376], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
[√] Chrome - develop for the web
[√] Android Studio (version 2020.3)
[☠] IntelliJ IDEA Ultimate Edition (the doctor check crashed)
    X Due to an error, the doctor check did not complete. If the error message below is not helpful, please let us know
      about this issue at https://github.com/flutter/flutter/issues.
    X FormatException: Unexpected extension byte (at offset 5)
[√] Connected device (3 available)

! Doctor found issues in 1 category.
0 Answers
Related