Sets up a Windows environment for Flutter development. Use when configuring a Windows machine to run, build, or deploy Flutter applications for Windows desktop or Android.
Configure the Windows environment to support both Flutter framework execution and native C/C++ compilation. Differentiate strictly between Visual Studio (required for Windows desktop C++ compilation) and VS Code (the recommended Dart/Flutter code editor).
Follow this sequential workflow to initialize the Flutter SDK on a Windows machine.
C:\src\flutter). Do not install in protected directories like C:\Program Files\.bin directory.bin directory path to the system or user PATH variable.PATH changes.flutter doctor -v.Apply conditional logic based on the specific platform you are targeting for development.
If targeting Windows Desktop:
flutter config --no-enable-<platform> (e.g., flutter config --no-enable-windows-desktop).If targeting Android on Windows:
flutter devices.To distribute a Windows desktop application, assemble the compiled executable and its required dependencies into a single distributable archive.
flutter build windows to compile the release build.build\windows\runner\Release\.Release directory into the staging directory:
.exe)..dll files.data directory.msvcp140.dllvcruntime140.dllvcruntime140_1.dll.zip file for distribution.If you require a self-signed certificate for MSIX packaging or local testing, use OpenSSL.
bin directory to your PATH environment variable.openssl genrsa -out mykeyname.key 2048openssl req -new -key mykeyname.key -out mycsrname.csropenssl x509 -in mycsrname.csr -out mycrtname.crt -req -signkey mykeyname.key -days 10000.pfx file: openssl pkcs12 -export -out CERTIFICATE.pfx -inkey mykeyname.key -in mycrtname.crt.pfx certificate on the local Windows machine. Place it in the Certificate Store under Trusted Root Certification Authorities prior to installing the application.When assembling your Windows build for distribution, ensure the directory structure strictly matches the following layout before zipping:
Release_Archive/
│ my_flutter_app.exe
│ flutter_windows.dll
│ msvcp140.dll
│ vcruntime140.dll
│ vcruntime140_1.dll
│
└───data/
│ app.so
│ icudtl.dat
│ ...