Last active
July 19, 2024 13:02
-
-
Save indraAsLesmana/321cc606c551aa04c27cf6a53f3f5c29 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
confusion about path sdk using FVM, about global env, and per project: | |
https://github.com/leoafarias/fvm/issues/599 | |
will fix with this: | |
export FLUTTER_HOME="$HOME/fvm/default" | |
proxy_flutter() { | |
local flutter_exec | |
if [[ -x "./.fvm/flutter_sdk/bin/flutter" ]]; then | |
flutter_exec="./.fvm/flutter_sdk/bin/flutter" | |
elif [[ -x "$HOME/fvm/default/bin/flutter" ]]; then | |
flutter_exec="$HOME/fvm/default/bin/flutter" | |
else | |
echo "Flutter executable not found. Make sure it's installed and paths are correctly set." | |
return 1 | |
fi | |
"$flutter_exec" "$@" | |
} | |
# Alias flutter command to our proxy method | |
alias flutter='proxy_flutter' | |
proxy_dart() { | |
local dart_exec | |
if [[ -x "./.fvm/flutter_sdk/bin/dart" ]]; then | |
dart_exec="./.fvm/flutter_sdk/bin/dart" | |
elif [[ -x "$HOME/fvm/default/bin/dart" ]]; then | |
dart_exec="$HOME/fvm/default/bin/dart" | |
else | |
echo "Dart executable not found. Make sure it's installed and paths are correctly set." | |
return 1 | |
fi | |
"$dart_exec" "$@" | |
} | |
# Alias Dart command to our proxy method | |
alias dart='proxy_dart' | |
vscode setting: | |
dart.addSdkToTerminalPath = true / ✅ | |
this make flutter doctor -v all green |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment