How to upgrade dart sdk

How to Upgrade Dart SDK

To upgrade your Dart SDK, you can follow the steps below:

  1. Open your terminal or command prompt.
  2. Check your current Dart SDK version by running the following command:

    dart --version
  3. Visit the official Dart SDK release page on GitHub at
    https://github.com/dart-lang/sdk/releases.
  4. Look for the latest version of the Dart SDK available. Usually, the latest release will be at the top of the list.
  5. Click on the version number to open its release notes.
  6. In the release notes, you will find a table listing various download options based on your system. Choose the appropriate download link for your operating system.
  7. Download the Dart SDK ZIP file for your operating system.
  8. Once the download is complete, extract the ZIP file to a directory of your choice.
  9. Update your system’s PATH environment variable to include the path to the new Dart SDK. You can do this by:

    a) On Windows:

    – Open the “System Properties” dialog.

    – Go to the “Advanced” tab and click on the “Environment Variables” button.

    – In the “System variables” section, find the “Path” variable and click on the “Edit” button.

    – Add a new entry at the end of the list with the path to the Dart SDK’s “bin” directory.

    – Click “OK” to save the changes.

    b) On macOS/Linux:

    – Open a terminal window.

    – Run the command:

    export PATH="$PATH:/path/to/dart-sdk/bin"

    – Replace “/path/to/dart-sdk/bin” with the actual path to the Dart SDK’s “bin” directory.
  10. Close and reopen your terminal or command prompt for the changes to take effect.
  11. Now, check your Dart SDK version again by running the command:

    dart --version
  12. If the version displayed is the new version you just installed, then the upgrade was successful.

That’s it! You have successfully upgraded your Dart SDK to the latest version. You can now enjoy the new features and improvements.

Note: Make sure to update any projects using the Dart SDK to ensure compatibility with the new version.

Leave a comment