question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Auto complete import is ignoring package imports

See original GitHub issue

Thanks for the feedback! If your issue is related to the Flutter framework itself, please open an issue at github.com/flutter/flutter.

Steps to Reproduce

Auto completing or importing any dart class imports using a relative path and ignores package imports already in the file. This is very hard to explain without showing so I made a quicktime movie here: https://drive.google.com/file/d/18Su81io_M3zSYCK0enYr5F6vtBCZ_KOq/view?usp=sharing

Version info

Please paste the output of running flutter doctor -v here (available from the command line or from Tools > Flutter > Flutter Doctor). It will provide the version of the Flutter framework as well as of the IntelliJ plugin.

~/checkout/flutter_expansion_games (feature/XWD-9527) $ flutter doctor -v [✓] Flutter (Channel master, v1.13.3-pre.19, on Mac OS X 10.13.6 17G8037, locale en-US) • Flutter version 1.13.3-pre.19 at /Users/jason/Applications/flutter • Framework revision fa190a8685 (5 days ago), 2019-12-13 13:27:53 -0800 • Engine revision e0e0ac0a68 • Dart version 2.8.0 (build 2.8.0-dev.0.0 45db297095)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.0) • Android SDK at /Users/jason/Library/Android/sdk • Android NDK location not configured (optional; useful for native profiling support) • Platform android-29, build-tools 29.0.0 • ANDROID_HOME = /Users/jason/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) • All Android licenses accepted.

[!] Xcode - develop for iOS and macOS (Xcode 9.4.1) • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 9.4.1, Build version 9F2000 ✗ Flutter requires a minimum Xcode version of 10.2.0. Download the latest version or update via the Mac App Store. ! CocoaPods 1.5.3 out of date (1.6.0 is recommended). 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 upgrade: sudo gem install cocoapods

[✓] Android Studio (version 3.5) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin version 42.1.1 • Dart plugin version 191.8593 • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[✓] VS Code (version 1.41.0) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.2.0

[✓] Connected device (1 available) • Android SDK built for x86 • emulator-5554 • android-x86 • Android 8.1.0 (API 27) (emulator)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:4
  • Comments:13 (5 by maintainers)

github_iconTop GitHub Comments

22reactions
magilluscommented, Dec 18, 2019

Fixed with those steps:

  1. Switched to beta and back to master
  2. clearing .packages .dart_tool directory and pubspec.lock

Not sure what fixed this issue

6reactions
DyaryRaoofcommented, Jan 7, 2020

Fixed with those steps:

  1. Switched to beta and back to master
  2. clearing .packages .dart_tool directory and pubspec.lock

Not sure what fixed this issue

Thank you , Thank you , Thank you. This bug has been driving me crazy. I tried everything and searched quite a while . you are a life saver @magillus . I really would want to kiss you right now if it wasn’t awkward. clearing .packages .dart_tool directory and pubspec.lock did the magic.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to autocomplete/import Flutter classes in IntelliJ?
If I selected something that wasn't already imported, it should import it for me. This basic functionality is available in many other languages ......
Read more >
Auto import | PyCharm Documentation - JetBrains
The import statement is added to the imports section, but the caret does not move from the current position, and your current editing...
Read more >
Auto-import code-completion, improved dependencies tree...
Auto -Importing from Code Completion. #1060: Code completion now lists symbols that are not yet imported and will auto-import the required library when...
Read more >
Settings Reference for Python - Visual Studio Code
Note that Visual Studio code ignores this setting when debugging because ... importFormat, absolute, Defines the default format when auto importing modules.
Read more >
Running mypy and managing imports
* after foobar will ignore imports of foobar modules and subpackages in addition to the foobar top-level package namespace. To suppress all missing...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found