Since Flutter V3.0(當前stable最高V3.3.2)
Flutter3.0之后之間創(chuàng)建項目就會有web、Windows、macOS、Linux的支持
flutter create my_app
舊項目中創(chuàng)建平臺支持(Flutter3.0之前)
添加Windows、macOS、Linux平臺支持,也可以只添加你想要的平臺,去掉對應的平臺名即可。主要命令最后的.不能去掉(原因未知)
flutter create --platforms=windows,macos,linux .
macOS網(wǎng)絡設置
添加網(wǎng)絡客戶端屬性到macos/Runner/DebugProfile.entitlements和macos/Runner/Release.entitlements.
<key>com.apple.security.network.client</key>
<true/>