flutter / flutter-intellij

Flutter Plugin for IntelliJ
https://flutter.dev/using-ide
BSD 3-Clause "New" or "Revised" License
1.98k stars 317 forks source link

Improve multi-Module support #1904

Open pq opened 6 years ago

pq commented 6 years ago

As mentioned by @matejthetree in #1889, setting up projects with multiple modules currently requires some heroics. For example, see https://github.com/apptreesoftware/letsvote#intellj-multi-module-setup which has these directions.

IntellJ multi-module setup It is convenient to have a single project that contains each sub-project as a module.

open project settings (cmd+;) open "Modules" page remove the exisiting module click "+" and select letsvote_mobile.iml file click "+" and select letsvote_web.iml file click "+" and select letsvote_server.iml file After Step 3 Intellij will need the Flutter SDK to be set again. Go to Preferences (cmd+,) and re-select your flutter SDK path

We should make this better...

cc @jwren @alexander-doroshko

Andrious commented 5 years ago

The 'stackoverflow community' don't seem to understand what I'm asking and put my question on hold: Add 'Modules' to a Flutter Project in Android Studio [on hold]

However, I found this issue posted a year ago, today. Please, I can't make heads or tails of it. Has this been resolved? If it has, I still can't figure out how to allow for 'multiple modules' in a Flutter project.

Regards,

Greg

pq commented 5 years ago

This actually just came up in #3257 as well.

The short story is that it's still a very manual process. As @matejthetree describes, you need to manually add each module to the project's settings.

In a more ideal world, this could happen as part of project import.

neokree commented 4 years ago

Other than this issue, I would report that when multi module support is active, there are some strange behaviours with the VCS plugin (I'm using git).

Some of the problems reported are:

These issues go away after a VCS -> Refresh file status, but it is far from optimal.

MisterJimson commented 3 years ago

I also find that syntax highlighting, autocomplete and dartfmt doesn’t always work with muti module project, and generally I see a lot of issues whenever I try to use them.

Here is a video of what I have been trying to fix for about 2 hours: https://www.youtube.com/watch?v=qGkT4_qZ5Yo