Since Flutter V3.0(当前stable最高V3.3.2)
Flutter3.0之后之间创建项目就会有web、Windows、macOS、Linux的支持
flutter create my_app
旧项目中创建平台支持(Flutter3.0之前)
添加Windows、macOS、Linux平台支持,也可以只添加你想要的平台,去掉对应的平台名即可。主要命令最后的.不能去掉(原因未知)
flutter create --platforms=windows,macos,linux .
macOS网络设置
添加网络客户端属性到macos/Runner/DebugProfile.entitlements和macos/Runner/Release.entitlements.
<key>com.apple.security.network.client</key>
<true/>