Autocompletion does not work for dependency package.
See original GitHub issueSteps to Reproduce
I am recently moving to FLutter and started with Codelabs. I am not seeing the autocomplete working in Android Studio for the dependent class. For example. using the CodeLab, I imported the
import 'package:english_words/english_words.dart';
in my class. I do not see the autocomplete working correctly for this package. Only when I type the complete class name, I see the methods in the class.
Example:
On line number 9, I had to type the whole class name and for demo purpose, I am showing the issue on line number 10 where you can see the autocomplete does not work.
Version info
[✓] Flutter (Channel stable, v1.12.13+hotfix.8, on Mac OS X 10.15.3 19D76, locale en-CA)
• Flutter version 1.12.13+hotfix.8 at /Users/asharma/Library/flutter
• Framework revision 0b8abb4724 (7 weeks ago), 2020-02-11 11:44:36 -0800
• Engine revision e1e6ced81d
• Dart version 2.7.0
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at /Users/asharma/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.2
• ANDROID_HOME = /Users/asharma/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[✗] Xcode - develop for iOS and macOS
✗ Xcode installation is incomplete; a full installation is necessary for iOS development.
Download at: https://developer.apple.com/xcode/download/
Or install Xcode via the App Store.
Once installed, run:
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
sudo xcodebuild -runFirstLaunch
✗ CocoaPods not installed.
CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
Without CocoaPods, plugins will not work on iOS or macOS.
For more info, see https://flutter.dev/platform-plugins
To install:
sudo gem install cocoapods
[✓] Android Studio (version 3.5)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 44.0.1
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
[!] IntelliJ IDEA Community Edition (version 2019.3.4)
• IntelliJ at /Applications/IntelliJ IDEA CE.app
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
• For information about installing plugins, see
https://flutter.dev/intellij-setup/#installing-the-plugins
[!] VS Code (version 1.30.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
✗ Flutter extension not installed; install from
https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[✓] Connected device (1 available)
• Android SDK built for x86 • emulator-5554 • android-x86 • Android 9 (API 28) (emulator)
! Doctor found issues in 4 categories.
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
Flutter autocomplete not working in VSCode for packages
You must make sure that your dependencies for plugins are mentioned under dependencies: section, not under dev_dependencies: section like ...
Read more >autocomplete-plus - Atom
Autocomplete+ package. macOS Build Status Windows Build status Dependency Status. Displays possible autocomplete suggestions on keystroke (or manually by ...
Read more >Solved: Code completion not working in Spyder 5.1.5 after
In the console, auto-completion works. So basically I use Spyder because its the supported IDE that ArcPro distributes through package manager ...
Read more >Autocompletion & tab complete no longer work after Atom ...
Auto complete is just not working correctly. It seems like the problem is that the filtering of that autocomplete options is failing to...
Read more >ng completion - Angular
This modifies your terminal environment to load Angular CLI autocompletion, but can't update your current terminal session. Either restart it or run source...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Have you tried these two steps?
Make sure you run
flutter pub get
https://flutter.dev/docs/get-started/codelab#step-2-use-an-external-packageIf that doesn’t work, try restarting the analysis server. https://www.jetbrains.com/help/idea/dart-analysis-tool-window.html | Restart Dart Analysis Server | Click this button to kill the Dart Analysis server and then start it.
If step 1 fixes the issue then there isn’t a bug. You will need to run
flutter pub get
after adding new dependencies. If step 2 fixes the issue then there is a bug in the analysis server and we can move the bug to https://github.com/dart-lang/sdk/issuesMake sure to put your dependencies to ‘dependencies’ not to ‘dev_dependencies’.