1、管理员运行powershell,安装:Chocolatey 工具,粘贴复制运行下列脚本:

Chocolatey 官方安装文档

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('http://community.chocolatey.org/install.ps1'))

2、使用choco(Chocolatey 工具) 安装dart-sdk

choco install dart-sdk

3、使用choco安装 fvm (flutter 版本管理工具)

choco install fvm

4、使用fvm 安装 flutter

fvm 命令官方文档

## 查看所有可用的 Flutter SDK 发行版:
fvm releases

## 安装对应版本的 flutter
fvm install 3.22.1

## 使用 flutter 3.22.1 
fvm use 3.22.1

## 查看已经使用的flutter版本
fvm flutter --version

##  设置flutter 全局版本
fvm global 3.22.1
##首次设置全局版本,需要配置flutter环境变量,补充见注意部分;
## 查询 flutter版本信息
flutter --version

注意:

首次设置全局版本,需要配置flutter环境变量:
windows系统 flutter 开发环境配置插图
复制 路径,并配置环境变量:
windows系统 flutter 开发环境配置插图(1)

至此,flutter 开发环境配置完成!
本站无任何商业行为
个人在线分享 » windows系统 flutter 开发环境配置
E-->