flutter-intellij: Flutter autocomplete suggestions not working
My autocomplete suggestions just stopped working. As an example, none of the widgets show inside suggestions window when I start typing, here is the screenshot when I want to add BoxDecoration:
Steps to Reproduce
I’m not exactly sure how this happened, but the issue started when I ran android emulator inside tool window ( I ran it as a separate window before.)
I created this project few days ago and everything was working fine until now.
Version info
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.10.1, on Microsoft Windows [Version 10.0.19043.1526], locale sr-Latn-BA)
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
X cmdline-tools component is missing
Run `path/to/sdkmanager --install "cmdline-tools;latest"`
See https://developer.android.com/studio/command-line for more details.
X Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.
[√] Chrome - develop for the web
[X] Visual Studio - develop for Windows
X Visual Studio not installed; this is necessary for Windows development.
Download at https://visualstudio.microsoft.com/downloads/.
Please install the "Desktop development with C++" workload, including all of its default components
[√] Android Studio (version 2020.3)
[√] Android Studio (version 2021.1)
[√] IntelliJ IDEA Community Edition (version 2021.1)
[√] Connected device (4 available)
[√] HTTP Host Availability
! Doctor found issues in 2 categories.
Edit: I tried to fix it with invalidate caches and restart, flutter clean, without emulator running, running emulator outside tool window again. None of those things fixed the problem.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 3
- Comments: 40 (11 by maintainers)
This just started happening to me after Flutter 3.0, suggestions like setState and overrides such as initState and didChangeDependecies aren’t working anymore. May we reopen this please?
Omg, finally I find out someone who has the same issue with a setState. I’m new to programming (and learning Flutter) and can’t realize the reason for such thing. So, this is just a glitch of 3.0 and will be fixed? 😉
https://user-images.githubusercontent.com/12734534/174441369-fc4b4bee-eb9e-472d-9572-fc76500707a1.mov
I’m having problems related to imports too, the auto-complete only works when i force using CTRL + SPACEBAR two times
I’m using Flutter latest version (3.0.2)
Same problem… Android Studio Electric Eel | 2022.1.1 and Flutter 3.7.0
Suggestions not working but autocomplete works using CTRL + SPACEBAR two times
I second @thassio-vinicius this is a small issue but it lags the productivity of developer and it needs to be fixed
@rorystephenson Thanks for participating and presenting your solution.
Unfortunately, my
pubspec.yaml
file has those lines and autocomplete doesn’t work. Probably something different happened with my project 😦As a last resort I tried using
git bisect
to determine if it was a non-config related change and it was. For some reason quite a while ago I removed flutter as an explicit dependency in my pubspec.yaml 🤦 . Surprisingly everything continued to work except for auto-completions and running flutter tests via right-click.Adding the following back has made everything work again, hopefully this solves it for someone else too:
Flutter 3.0.3 • channel stable • https://github.com/flutter/flutter.git Framework • revision 676cefaaff (9 days ago) • 2022-06-22 11:34:49 -0700 Engine • revision ffe7b86a1e Tools • Dart 2.17.5 • DevTools 2.12.2
Oh Thanku Man ♥❤💞
It recently started to happen to me as well, and I think it was after updating to Flutter 3.0. I hope they fix it with a minor update soon.
@stevemessick I opened the project to test capitalization. Before I did anything I wanted to test if autocompletion works by some miracle so I went to my screen file and to my surprise, autocompletion now WORKS. I didn’t change anything nor did I open the project from the last time.
Before I opened this old project I worked on my current project and updated Kotlin and Dart plugins. I restarted AS and then opened my old project. Is it possible that this somehow fixed it ?
According to Google translate, the previous comment is:
That’s interesting. I’m not sure what
Model Name
refers to, but based on the capitalization comment I tried changing the name ofmain.dart
toMain.dart
and changed the project name inpubspec.yaml
to use camel-case. Neither had an effect on completion, though.@BojanDolic Could your project be affected by capitalization?