Reputation: 5337
I'm on Windows 11. I have two flutter projects: A Flutter web project using flutter 3.0.4 and a flutter ios and android project using flutter 3.3.1. I switch between them using this Powershell function
function flu($param){
pushd C:\flutter\
if ($param -eq 'web') {
git checkout -q 3.0.4
}
else{
git checkout -q 3.3.1
}
popd
flutter doctor -v
}
The web, android, and ios have their own dependencies, and there's always be a caching problem. flutter clean
doesn't fix it, I find myself forced to manually delete the pub_cache
folder and then do flutter pub get
Is there any way to specify a different pub_cache
folder per project?
Upvotes: 1
Views: 306
Reputation: 44186
You should be able to use puro to have multiple versions of flutter installed, selected by project. The pub "cache" is just copies of the pub files... and should be able to be shared between your projects.
Upvotes: 1