I'm on a Mac and I upgraded to Dart 2.8 from Dart 2.7.1 by running
brew upgrade dart
as it describes in the documentation.
However, version 2.8 contains some breaking changes for the Aqueduct framework, so I want to downgrade to Dart 2.7.2.
I tried
brew install [email protected]
but got
Error: No available formula with the name "[email protected]"
I also tried
brew search dart
but only got
dart-lang/dart/dart ✔
dart-lang/dart/dart-beta
dart-lang/dart/dart@1
dart-lang/dart/dart@2
dartsim
There is no option to select a lower 2.x version.
How do I downgrade?
run brew info dart and find the formula link, for example
From: https://github.com/dart-lang/homebrew-dart/blob/master/dart.rb
open the formula link in your browser, it will take you to the master branch repo page
go back with your browser to the repo page and click "History"
run brew uninstall dart
install an older version of Dart with
brew install https://raw.githubusercontent.com/dart-lang/homebrew-dart/fed6de080aef54c4f1c1df732424df37cd3e5a3e/dart.rb
master with the commit ID (hash) fed6de080aef54c4f1c1df732424df37cd3e5a3e obtained in step 3.Have a look at the packages fvm and dswitch.
Both let you change between dart versions.
Fvm for the flutter dart sdk Dswitch for the straight dart sdk.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With