Dart官网:
https://dart.dev/
一、命令行安装
https://dart.dev/get-dart
You can install the Dart SDK using Chocolatey.
error Important: These commands require administrator rights. Here’s one way to open a Command Prompt window that has admin rights:
- Press Windows+R to open the Run window.
- Type
cmd
into the box. - Press Ctrl+Shift+Enter.
To install the Dart SDK:
C:\> choco install dart-sdk
To upgrade the Dart SDK:
C:\> choco upgrade dart-sdk
By default, the SDK is installed at C:\tools\dart-sdk. You can change that location by setting the ChocolateyToolsLocation environment variable to your chosen installation directory.
If you can’t use the Dart SDK executables, add the SDK location to your PATH:
- In the Windows search box, type
env
. - Click Edit the system environment variables.
- Click Environment Variables….
- In the user variable section, select Path and click Edit….
- Click New, and enter the path to the
dart-sdk
directory. - In each window that you just opened, click Apply or OK to dismiss it and apply the path change.
二、客户端安装
下载客户端
https://gekorm.com/dart-windows/
当前最新文档版本地址:
https://objects.githubusercontent.com/github-production-release-asset-2e65be/40707560/ebd20a00-adef-11e8-9523-d955f2ae35b3?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20240121%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240121T015938Z&X-Amz-Expires=300&X-Amz-Signature=15ebdb64fa808e2a4433aabe31721230d6c3e026e44c3455b733fb3c0f244a83&X-Amz-SignedHeaders=host&actor_id=16099831&key_id=0&repo_id=40707560&response-content-disposition=attachment%3B%20filename%3DDart_x64.stable.setup.exe&response-content-type=application%2Foctet-stream
下载后,打开客户端
点击下一步
选择合适的安装目录
点击下一步
点击安装
等待下载安装(如果网速很慢,需要魔法)
点击完成
三、测试
dart --version