简体   繁体   中英

Flutter Windows Desktop Support

Im currently working on a MacBook developing a Flutter app for Android and IOS, and both are running fine on simulators from my Mac. I use VS Code.

Now I want to add desktop support to it (specifically Windows) but I just read that in order to do that, it has to be built on Windows.

Does that mean I'll have to create a new project on a Windows PC and manually copy all of my files to it and have 2 different set of codes?

Just move your project to a device running Windows OS and build the file output for Windows OS.

flutter config --enable-windows-desktop
flutter build windows

more info

You need a Windows environment to enable windows support.

on Windows, you can dev: android + web + windows
on macOS, you can dev: android + web + iOS + macOS
on Linux, you can dev: anroid + web + linux

You can share the same project among these environments. Once you enable a certain platform, it will create a separate folder for it. So if you enable multiple, your project will simply have multiple folders in its root, such as "ios", "web", "macos", etc.

For windows, you also need to install VS2022, for macOS you need XCODE, for Linux you also need some tools (the installation is made into a script, so just run that).

For more info, head over to flutter.dev .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM