flutter / flutter/flutter-intellij
Quick-fix doesn't suggest to import a package the first time it is used
- Dominant language
- Java
- Stars
- 2k
- Forks
- 356
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 27
Description
## Steps to reproduce
1. Add a new package dependency to your pubspec.yml file and run `flutter pub get`.
2. Try to use a class (or whatever symbol) defined in the newly added package without importing the package; it will be underlined as an error.
3. Press Alt+Enter to show the quick-fixes.
There's not any quick-fix for importing package. This happens only the first time the package is used.
## Version info
```
[✓] Flutter (Channel stable, v1.5.4-hotfix.2, on Linux, locale it_IT.UTF-8)
• Flutter version 1.5.4-hotfix.2 at /opt/flutter
• Framework revision 7a4c33425d (7 weeks ago), 2019-04-29 11:05:24 -0700
• Engine revision 52c7a1e849
• Dart version 2.3.0 (build 2.3.0-dev.0.5 a1668566e5)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at /opt/android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• ANDROID_SDK_ROOT = /opt/android/sdk
• Java binary at: /opt/android-studio/jre/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b16-5323222)
• All Android licenses accepted.
[✓] Android Studio (version 3.4)
• Android Studio at /opt/android-studio
• Flutter plugin version 36.1.1
• Dart plugin version 183.6270
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b16-5323222)
[!] IntelliJ IDEA Ultimate Edition (version 2018.2)
• IntelliJ at /home/janluke/Programmi/idea-IU-182.4505.22
✗ 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
[!] IntelliJ IDEA Ultimate Edition (version 2018.3)
• IntelliJ at /home/janluke/.local/share/JetBrains/Toolbox/apps/IDEA-U/ch-0/183.4588.61
✗ 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.33.1)
• VS Code at /usr/share/code
• Flutter extension version 3.1.0
[✓] Connected device (1 available)
• Redmi Note 5 • ba3281e • android-arm64 • Android 9 (API 28)
! Doctor found issues in 2 categories.
```
Contributor guide
Research direction
Reproduce the issue by adding a dependency in pubspec.yml, running flutter pub get, and invoking Alt+Enter on the first unresolved package symbol. Compare the quick-fixes available on first and later uses, and verify that the completed change offers the appropriate package import suggestion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- flutter, java
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100