【问题标题】:Flutter Web on ChromeChrome 上的 Flutter Web
【发布时间】:2021-10-02 09:10:32
【问题描述】:

我一直在尝试在 Chrome 上运行我的 Flutter Web 项目,但它一直在 Chrome 的访客模式功能上启动它(尽管我已按照 here 的说明禁用了访客模式)。

我也尝试过使用flutter run -d web-server 运行该项目,但网页屏幕是空的,控制台中没有打印任何内容。

是否有在 chrome 默认选项卡上运行项目?

我也检查了这个问题,但没有帮助: https://github.com/flutter/flutter/issues/43809

【问题讨论】:

    标签: flutter dart web flutter-web


    【解决方案1】:

    在你运行flutter build webcd进入你的Flutter项目的/build/web目录后,运行python -m http.server 8000。然后,您可以打开一个普通的 chrome 选项卡并访问您的网站应该运行的“0.0.0.0:8000”。查看更多here

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-11-18
      • 2021-08-24
      • 2021-03-09
      • 2022-08-03
      • 2020-10-05
      • 2020-10-15
      • 2021-07-07
      • 1970-01-01
      相关资源
      最近更新 更多