packages folder is added as ignored in "Project Structure -> Modules"
See original GitHub issueI’m following a few tutorials like bloclibrary.dev where packages
folder is used to group local packages used by the application.
The issue is that every time that flutter pub get
is executed, IntelliJ/Android Studio adds the packages
folder into Project Structure -> Modules -> Excluded Folders
so the code is not included in the source.
Steps to Reproduce
- Create a project flutter project.
- Create a folder
packages
- From inside of that folder, create a flutter package. For example:
flutter create --template package pack1
- Add the package into the main
pubspec.yaml
. For example:dependencies: flutter: sdk: flutter auth_repository: path: packages/pack1
- From the root of the project, execute
flutter pub get
- Regress the project in IntelliJ/Android Studio with
reload from Disk
option, for example. - Check
Project Structure -> Modules -> Excluded Folders
andpackages
folder will be in the list of the excluded folders.
Version info
/home/angelcc/apps/flutter/bin/flutter doctor --verbose
[✓] Flutter (Channel beta, 1.20.0, on Linux, locale en_IE.UTF-8)
• Flutter version 1.20.0 at /home/angelcc/apps/flutter
• Framework revision 916c3ac648 (3 weeks ago), 2020-08-01 09:01:12 -0700
• Engine revision d6ee1499c2
• Dart version 2.9.0 (build 2.9.0-21.10.beta)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.1)
• Android SDK at /home/angelcc/apps/Android/Sdk
• Platform android-30, build-tools 30.0.1
• ANDROID_SDK_ROOT = /home/angelcc/apps/Android/Sdk
• Java binary at: /home/angelcc/.local/share/JetBrains/Toolbox/apps/AndroidStudio/ch-0/193.6626763/jre/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
• All Android licenses accepted.
[✓] Chrome - develop for the web
• Chrome at google-chrome
[✓] Android Studio (version 4.0)
• Android Studio at /home/angelcc/.local/share/JetBrains/Toolbox/apps/AndroidStudio/ch-0/193.6626763
• Flutter plugin version 48.0.2
• Dart plugin version 193.7361
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
[✓] Connected device (3 available)
• AOSP on IA Emulator (mobile) • emulator-5554 • android-x86 • Android 9 (API 28) (emulator)
• Web Server (web) • web-server • web-javascript • Flutter Tools
• Chrome (web) • chrome • web-javascript • Google Chrome 84.0.4147.135
• No issues found!
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
IntelliJ does not show project folders - Stack Overflow
In File > Project Structure > Modules, click the "+" button, ... directory name is not excluded in Settings | File Types |...
Read more >Configuring Project Structure | PyCharm Documentation
Within a content root, PyCharm can distinguish between the folders that contain source code, and the ones to be ignored while searching, parsing ......
Read more >How to ignore files from your npm package | Zell Liew
What you'll do is create a .gitignore file. # .gitignore node_modules. In this case, both Git and npm ignore the node_modules folder.
Read more >PackageReference in project files - NuGet - Microsoft Learn
Package references, using <PackageReference> MSBuild items, specify NuGet package dependencies directly within project files, as opposed to ...
Read more >Modules Management — Airflow Documentation
Also make sure to Add init file to your folders. Typical structure of packages¶. This is an example structure that you might have...
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
Agree, I’ll fix this and publish new Dart plugin soon.
Fixed. The latest Dart plugin won’t change
packages
folder exclusion state automatically. Users may exclude or unexcludepackages
folders manually as needed.