Skip to content

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

Closed

Description

@DanTup

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).

Activity

  1. added
    is enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.
    in flutterRelates to running Flutter apps
    on Jul 2, 2020
  2. added this to the v3.13.0 milestone on Jul 2, 2020
  3. jonahwilliams commented on Jul 9, 2020

    @jonahwilliams

    Seems like a reasonable update to the API

  4. DanTup commented on Jul 16, 2020

    @DanTup
    MemberAuthor

    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 :-)

  5. DanTup commented on Jul 16, 2020

    @DanTup
    MemberAuthor

    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.

  6. added 2 commits that reference this issue on Jul 16, 2020
    b836558
    32729a8
  7. 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
  8. added 2 commits that reference this issue on Jul 22, 2020
    229c0e1
    8210976
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    in flutterRelates to running Flutter appsis enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions