为什么 flutter config for web 显示像 enable-web: true (Unavailable)?

why does flutter config for web shows like enable-web: true (Unavailable)?

我想在 flutter 中开发带有 Beta 支持的 Web 应用程序。因此,我通过 CLI 启用了 web in flutter config,如下所示。

$ flutter config --enable-web
WARNING: cgroup v2 is not fully supported yet, proceeding with partial confinement
Setting "enable-web" value to "true".

You may need to restart any open editors for them to read new settings.

作为开发过程的下一步,我想检查浏览器是否作为带有 flutter 的设备连接,但没有

$ flutter devices
WARNING: cgroup v2 is not fully supported yet, proceeding with partial confinement
No devices detected.

因此,我交叉验证了 flutter 配置,它显示 web 启用的状态为

$ flutter config
...
Settings:
  enable-web: true (Unavailable)

为什么enable-web显示为true,但不可用?如何在 flutter 中将网络浏览器连接为设备?

您目前处于flutter稳定频道。 Flutter 目前仅支持 beta 和更高版本。您可以更改为测试版并启用网络支持:

flutter channel beta
flutter upgrade
flutter config --enable-web

Source