Skip to content

Pass hot reload/hot restart callbacks and reload sources path to StrategyProviders instead #2584

Closed
@srujzs

Description

@srujzs

Currently, with hot restart, we call a developer extension method to disassemble the Flutter engine after we've successfully hot restarted the application. This allows the Flutter engine to restart state.

As we add hot reload, we're doing something similar: reassembling the Flutter engine so that it renders a new frame after a hot reload.

Similarly, we assume there exists a path in the global window that the injected client can request to find the paths that have changed for a hot reload.

This would also help analytics determine the cost of reload vs reassemble.


These are all implicit assumptions that are tied to Flutter tools. We should avoid this and instead have the providers take several options:

  • One for developer extensions (including args) that need to be called after a hot restart (note that DWDS must do this as it is able to evaluate JS expressions, where Flutter tools does not).
  • One for developer extensions (including args) that need to be called after a hot reload, like reassemble.
  • One for the reload sources path that DWDS fetches from.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions