Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在最新的flutter版本(1.9)中,他们提供了将flutter_web包迁移到flutter主包的选项。那么如何为移动和网络创建一个单一的颤振项目呢?如何将现有的flutter web项目从flutter_web转换为flutter?
我所做的并且运行良好的是从头开始创建一个新项目,使用“flutter config --enable-web”启用网络,并在其上复制 lib 内容,只需要更新 pubspec.yaml,请注意现在资产在 yaml 中声明,就像普通的颤振应用程序一样,我希望它有所帮助。
在 chrome 中启动 Flutter web:flutter run -d chrome
构建:flutter build web