Skip to content

flutter create: record Dart SDK location in non-IDEA-specific config file? #10096

@skybrian

Description

@skybrian

We currently record the Dart SDK's location in .idea/libraries/Dart_SDK.xml. This file isn't easily readable by other editors or IDE's.

For example, this just happened to me with VS Code. (However, it is a corner case. VS Code looks in the user's PATH for the flutter command, which should work for users who follow the official instructions, but fails for weird people like me who use a bash alias instead.)

We might want to consider putting either the Flutter SDK or the Dart SDK's location somewhere else? Perhaps in a ide_settings.json file? If flutter create creates it and the Flutter plugin updates it, the user can switch between VS Code and IDEA and everything will work, even if the user switches Flutter SDK's in the IDE.

One possible design might be to stop generating the .idea folder in flutter create and instead have the Flutter plugin get its settings from an .ide_settings.json file. This would make the flutter SDK less tied to a specific IDE, and avoid clutter for other situations, such as creating a new module in an existings IDE project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    toolAffects the "flutter" command-line tool. See also t: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions