首先,部署flutter环境就不多说了,好多文章都可以查到,这里直接说怎么运行起一个web程序;
因为运行一个Android程序太简单了,各种教程各种书各种视频都是教怎么运行Android程序的,可能是因为我本身是做Android的所以看到的都是Android程序教程,不过我想搞一个web程序太难了,查了好久都不行;最后看了官网才一目了然:
官网在这里:传送门
以后有能力最好还是去官网吧;
Add web support to an existing app
To add web support to an existing project, run the following command in a terminal from the root project directory:
$ flutter create .
To serve your app from localhost
in Chrome, enter the following from the top of the package:
$ flutter run -d chrome
解释一下,就是说新建一个正常的flutter demo,然后使用terminal进入到这个demo的主目录