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
Custom commands to obtain the Dart and Flutter SDK roots dynamically #5334
Is your feature request related to a problem? Please describe.
This is a proposal to fix issues such as #5117 , where the path to the SDK is not statically known when using tools such as ASDF, mise or direnv.
It would be great if there was a setting which lets the user provide a command to run that should print to stdout the SDK path. This would allow a project to provide a command such as asdf where flutter with the working directory being the firstFlutterProject variable in the extension source code or the workspaceFile directory in case there is one.
This would let these kind of tools automatically switch vesions according to each project requirements or even let the user define a custom shell/python script based on their own rules.
Describe alternatives you've considered
I've tried using the FLUTTER_ROOT variable in the shell configuration as "$(asdf where flutter)", but that will not be dynamic, which defeats the whole purpose of these versioning tools.
The following simple proof of concept works as expected.
changed the title [-]Custom command to obtain the Flutter SDK root dynamically [/-][+]Custom commands to obtain the Flutter and Flutter SDK root dynamically [/+]on Jan 21, 2025
changed the title [-]Custom commands to obtain the Flutter and Flutter SDK root dynamically [/-][+]Custom commands to obtain the Dart and Flutter SDK roots dynamically [/+]on Jan 21, 2025
Activity
Custom commands to obtain the Dart/Flutter SDK path (#5377)
[-]Custom command to obtain the Flutter SDK root dynamically [/-][+]Custom commands to obtain the Flutter and Flutter SDK root dynamically [/+][-]Custom commands to obtain the Flutter and Flutter SDK root dynamically [/-][+]Custom commands to obtain the Dart and Flutter SDK roots dynamically [/+]