不要直接双击 build/web/index.html 用 file:// 打开。请用 HTTP 服务访问,例如:
build/web/index.html
file://
flutter run -d chrome
或:
python -m http.server 8010 --directory build/web
然后打开 http://127.0.0.1:8010/。
http://127.0.0.1:8010/