You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Include "unsupported" devices in the device picker, offer to run "flutter create ." when selected #2602
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).
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 :-)
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.
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[/+]on Jul 16, 2020
Activity
jonahwilliams commentedon Jul 9, 2020
Seems like a reasonable update to the API
DanTup commentedon 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
windowsfolder onmacOS, it is included in the results forgetSupportedPlatforms. It's then filtered out because there's nodevicefor 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
supportedPlatformsis something that can be enabled :-)DanTup commentedon 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.Show unsupported devices in device picker, offer to run "flutter crea…
Add tests for unsupported devices and running "flutter create ."
[-]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[/+]Show unsupported devices in device picker, offer to run "flutter crea…
Add tests for unsupported devices and running "flutter create ."