Skip to content

Support a single preview server for multiple applications #173550

@DanTup

Description

@DanTup

Currently it seems like the preview expects to be invoked for a single project only. But inside IDEs, there might be multiple Flutter projects open.

It would be nice if there was a way to spawn the server once without being tied to a specific project, and then have the preview work based on the project of the active file (eg. if you switch between files in two different Flutter projects, the preview would reload between them).

We could handle this in the IDE by spawning a server-per-project and just changing the URL for the iframe, but it would either mean starting the servers lazily (and shutting them down) which makes them slower, or using more memory to keep multiple servers alive.

cc @bkonyi

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: widget previewsIssues related to the Widget Previewer toolingteam-toolOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-toolTriaged by Flutter Tool team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions