安装依赖
# 安装相关工具
pub global activate webdev
pub global activate stagehand
开发 web 应用
# 创建web应用
mkdir quickstart
cd quickstart
stagehand web-simple
# 安装依赖
pub get
# 启动服务
$ webdev serve
[INFO] Building new asset graph completed, took 816ms
[INFO] Checking for unexpected pre-existing outputs. completed, took 0ms
[INFO] Serving `web` on http://127.0.0.1:8080
[INFO] Running build completed, took 974ms
[INFO] Caching finalized dependency graph completed, took 83ms
[INFO] Succeeded after 1.1s with 11 outputs (1437 actions)
[INFO] ----------------------------------------------------------------------------------------------------------------
可以看到应用启动在 [http://127.0.0.1:8080](http://127.0.0.1:8080)
, 打开浏览器访问, 页面输出: Your Dart app is running.
目录结构
新建的目录结构如下: