1.安装chocolatey工具

dart’官网:https://www.dartlang.org
chocolatey:https://chocolatey.org/
以管理员身份打开命令提示符
win10下dart环境搭建 - 图1

  1. @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"

复制以上并回车,如果没有报错就安装好惹。

2.安装dart SDK

https://www.dartlang.org/tools/sdk#install-using-chocolatey
To use Chocolatey to install a stable release of the Dart SDK, run this command:

  1. C:\> choco install dart-sdk

To install a dev release, run this command:

  1. C:\> choco install dart-sdk --pre

To upgrade the Dart SDK, run this command (add --pre to upgrade the dev release):

  1. C:\> choco upgrade dart-sdk

100M样子