Flutter 开启 Windows、macOS 平台支持的命令


Flutter 的多平台支持除了 Android 和 iOS 是默认开启的以外,比如 Windows、Linux 平台的支持需要手动开启。

Flutter config 命令集中,有以下参数是对于平台开启或关闭的配置:

--[no-]enable-web
--[no-]enable-linux-desktop
--[no-]enable-macos-desktop
--[no-]enable-windows-desktop
--[no-]enable-android
--[no-]enable-ios

开启平台支持:

C:\Users\shiramashiro> flutter config --enable-windows-desktop

关闭平台支持:

C:\Users\shiramashiro> flutter config --no-enable-windows-desktop