Reputation: 363
I installed Flutter and Android Studio. I ran flutter doctor - Flutter doctor
I have the Dart plugin installed - v191.8593.
When I press Ctrl + Space at a very obvious place the AutoComplete do not suggest the right suggestions. Example:
As you see the first suggestion are not of type ScrollPhysics and are out of context, and after I scroll down, there are ScrollPhysics suggestions, but they are after some scrolling.
Upvotes: 26
Views: 25902
Reputation: 51
Disabling and enabling both dart and flutter plugin fixed it without restarting AS. AS will ask when you first disable but ignore and enable again.
Buy me a beer.
Upvotes: 0
Reputation: 11
You need to add path of your project here for Autocomplete to work or disable it, easiest way is to let auto completes the process
Upvotes: 0
Reputation: 1
First check in Android Studio > Settings > Editor > Live Templates that is it empty or not.
If it's empty then Make sure you have installed latest version of android studio and autosuggestion is on.
For checking if autosuggestion is on or not follow the steps given below; Android Studio > Settings > Editor > General > Code Completion
And finally follow below steps: Go to Android studio > File > Manage IDE Settings > Restore Default Settings
Upvotes: 0
Reputation: 51
Remove Flutter And Dart Plugins and reinstall it will work for suggestion like stateless and stateful widgets if this don't work then remove all the plugins and reinstall will do!
Upvotes: 2
Reputation: 171
I fix this by enable the Scope Analysis, at Dart Analysis-> Set Icon-> CheckBox.
Upvotes: 16
Reputation: 1
I had the same problem and solved it by changing the first letter of my project directory's name from capital letter to lowercase letter. Example : "My_project" => "my_project"
The solution was found there : https://github.com/flutter/flutter-intellij/issues/5978
Upvotes: 0
Reputation: 496
Restart Dart Analysis Server :-
If it does not work, try this :-
flutter pub get
Upvotes: 17
Reputation: 7098
This problem can be fixed by one of the following
File-> Ivalidate caches / Restart -> Invalidate and Restart
Note all above solutions works but are not permanent as it appears there is bug in latest dart Analysis server you can follow subscribe to this reported issue for more updates
Upvotes: 32
Reputation: 1
if you type stful it gives you the autocompletion of stateful widget for you. or you have to go to
> Setting -> Editor -> Live Templates ->(choose)Flutter->(tick the option)stful
This is the image Depicting the Steps
Upvotes: 0