How to change current dart sdk version

You can change the current Dart SDK version by following these steps:

  1. Open your terminal or command prompt.
  2. Type in the command to check your current Dart SDK version:
  3.       $ dart --version
        
  4. Visit the Dart SDK release page on the official Dart website to see the available versions: https://dart.dev/tools/sdk/releases
  5. Scroll down to find the version you want to change to.
  6. Copy the download link for the corresponding SDK version that matches your operating system.
  7. Go back to your terminal or command prompt and run the following command to download the specific Dart SDK version:
  8.       $ curl <download_link> -o dart-sdk.zip
        

    Replace <download_link> with the copied link from step 5.

  9. Extract the downloaded ZIP file to your desired location.
  10. In your terminal or command prompt, navigate to the extracted SDK directory:
  11.       $ cd <dart-sdk-folder>
        

    Replace <dart-sdk-folder> with the path to the extracted SDK folder on your system.

  12. Check the updated Dart SDK version by running the following command:
  13.       $ dart --version
        

That’s it! You have successfully changed your current Dart SDK version.

Leave a comment