Flutter for Web 环境变量配置

(vim ~/.bash_profile  进入配置)

(i  进入编辑状态)

(ESC  退出编辑状态)

(:wq 保存退出)

(source ~/.bash_profile  刷新配置)

1.把flutter sdk、dart sdk和webdev执行文件目录加入PATH环境变量:

export PATH="$PATH:`pwd`/flutter/bin"

export PATH="$PATH:`pwd`/bin/cache/dart-sdk/bin"

export PATH="$PATH:`pwd`/.pub-cache/bin"

2.dart环境变量配置

export DART_HOME=/Users/xxx/sdk/flutter/bin/cache/dart-sdk/bin

export PATH=${DART_HOME}:${PATH}

3、安装Flutter Web构建工具

flutter pub global activate webdev

你可能感兴趣的:(Flutter for Web 环境变量配置)