question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Trigger hot-reload and dartanalyzer on flutter sources change

See original GitHub issue

I 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:closed
  • Created 6 years ago
  • Comments:13 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
rrousselGitcommented, Apr 27, 2018

Oh, yeah. Sorry I forgot

Are you planning on contributing/committing the changes ?

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.

0reactions
DanTupcommented, May 19, 2018

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!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found