flutter VSCode build a web project

Terminal command execution

flutter pub global activate webdev
pub global activate stagehand

pub get
webdev serve

Note that some environment variables

export PATH="$PATH":"$HOME/flutter/.pub-cache/bin"

export DART_HOME=/Users/chenhao/flutter/bin/cache/dart-sdk/bin
export PATH=${DART_HOME}:${PATH}

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

After adding an environment variable to remember to look at source

source ~/.bash_profile

Guess you like

Origin www.cnblogs.com/qqcc1388/p/12427423.html