Trigger hot-reload and dartanalyzer on flutter sources change
See original GitHub issueI discovered the other day that hot reload works even when editing flutter sources from another project. That’s really cool for contribution. But Dart Code doesn’t handle it nicely for now.
Few things are missing :
- when having
hotReloadOnSave
to true, modifying flutter sources should trigger a hot reload. - dartanalyzer doesn’t run on flutter source when opening an external project.
- dartanalyzer within the opened project doesn’t detect flutter changes ; unless window is reloaded.
- breakpoints inside flutter works ; but pressing f10 return to the project instead of just going by one line.
With these fixed we’d have a super cool contributing workflow.
Issue Analytics
- State:
- Created 6 years ago
- Comments:13 (8 by maintainers)
Top Results From Across the Web
Hot reload - Flutter documentation
Hot reload works by injecting updated source code files into the running Dart ... Hot reload loads code changes into the VM and...
Read more >Flutter Hot Reload - Medium
Here I'll focus on the first part: recompiling the changed source files into something that the Dart VM can use. Recompiling. Logically if...
Read more >Settings - Dart & Flutter support for Visual Studio Code
Whether to automatically send a Hot Reload request to Flutter apps during ... This allows reloads to trigger when external tools modify Dart...
Read more >What is flutter - Dev Genius
Hot reload : Flutter's “hot reload” feature lets you quickly and easily make changes to your app without restarting it.
Read more >Linter rules - Dart
If you're writing Flutter code, use the rule set in the flutter_lints ... and calls to an object that is typed “Function” will...
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
Oh, yeah. Sorry I forgot
That’s the idea. I used the “workspace” as a workaround.
Although I think
Dart Code
should handle edits inside Flutter folder without workspaces. As the reason we are using workspaces for mono-repo don’t really apply to flutter sdk.Maybe not handle the whole flutter folder. example folder or similar are exceptions. But at the very least, the main package should be handled.
Closing this as I think the solution is to add the flutter folder to your workspace if you want it to be tracked for reloading. Implementing it by watching all files would be technically complicated (and probably fragile) and I think it’s a very uncommon use-case to not want to do this.
I do think Code could do better here though, and the issues linked above are probably the best way to resolve that. You should 👍 those issues to help them along!