flutter / flutter/flutter-intellij
Support Custom Flutter Widget Preview Root Folder
- Dominant language
- Java
- Stars
- 2k
- Forks
- 356
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 27
Description
Hello,
I would like to request being able to set a custom Flutter Widget Preview root.
In my project, when I open the "Flutter Widget Preview" pane it says "Pub root could not be found to start Flutter Widget Preview".
I believe this is because my repository has _two_ pub workspaces; one that is pure-dart and one that contains flutter code. IE.
```
my_repo/
| dart/
| | pubspec.yaml
| | my_dart_project/
| | | ...
| flutter/
| | pubspec.yaml
| | my_flutter_project/
| | | ...
```
If I click "Choose module and try again" I can manually point the server to `mp_repo/flutter/` and it starts normally.
I would like to change the directory for the Flutter preview to `my_repo/flutter/` so that the preview server properly starts automatically when I open my project.
Contributor guide
Research direction
Start by tracing how the Flutter Widget Preview pane discovers the pub root and how the “Choose module and try again” flow supplies a directory. Check how project settings could represent a custom preview root. Done means a project with separate Dart and Flutter workspaces starts the preview automatically from the selected Flutter directory.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- flutter, java
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100