Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include "unsupported" devices in the device picker, offer to run "flutter create ." when selected #2602

Closed
DanTup opened this issue Jul 2, 2020 · 3 comments · Fixed by #2651
Labels
in flutter Relates to running Flutter apps is enhancement
Milestone

Comments

@DanTup
Copy link
Member

DanTup commented Jul 2, 2020

If a project has no "web" folder we don't show the Chrome device, but it's not always obvious why.

It would be nice if we could still show the unavailable devices somewhere (maybe at the bottom of the device selector, with a note like "- unavailable for project") and offer some instructions on how to "upgrade" the project to support this (if appropriate).

It'd be nice if this behaviour was backed by Flutter so we don't need to hard-code rules directly into VS Code.

@jonahwilliams what to you think about getSupportedPlatforms having some flag to include unavailable platforms, but with a flag against them and a reason for why they're not available (at least for those that could be enabled - windows on linux probably doesn't make sense, but web would).

@DanTup DanTup added is enhancement in flutter Relates to running Flutter apps labels Jul 2, 2020
@DanTup DanTup added this to the v3.13.0 milestone Jul 2, 2020
@jonahwilliams
Copy link

Seems like a reasonable update to the API

@DanTup
Copy link
Member Author

DanTup commented Jul 16, 2020

I came to look at this, and realised that supportedPlatforms always includes platforms based on what's on disk, and not what devices are available. Eg. if I have a windows folder on macOS, it is included in the results for getSupportedPlatforms. It's then filtered out because there's no device for it.

Therefore, I don't think this actually requires any work in Flutter - I think in VS Code we can consider any device that is available but is not in supportedPlatforms is something that can be enabled :-)

@DanTup
Copy link
Member Author

DanTup commented Jul 16, 2020

Actually, that doesn't address the original issue of how the user enables the missing platforms. But it seems like the answer to that is always "run flutter create ." so I think we can show that for each of these.

DanTup added a commit that referenced this issue Jul 16, 2020
@DanTup DanTup changed the title It should be more obvious why some devices (eg. Chrome) are not available (eg. no "web" folder) Include "unsupported" devices in the device picker, offer to run "flutter create ." when selected Jul 16, 2020
DanTup added a commit that referenced this issue Jul 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in flutter Relates to running Flutter apps is enhancement
Projects
None yet
2 participants