Flutter Desktop Apps: Getting Started

Mar 28 2023 · Dart 2.19, Flutter 3.7, Android Studio 2021.3.1 or higher, Visual Studo Code 1.7.4 or higher

Part 1: Flutter Desktop Apps

13. Build a Release App

Episode complete

About this episode
Leave a rating/review
See forum comments
Cinema mode Mark complete Download course materials
Previous episode: 12. Create the Desktop Icon

Get immediate access to this and 4,000+ other videos and books.

Take your career further with a Kodeco Personal Plan. With unlimited access to over 40+ books and 4,000+ professional videos in a single subscription, it's simply the best investment you can make in your development career.

Learn more Already a subscriber? Sign in.

Transcript: 13. Build a Release App

If you want to distribute your app to your users, you need something to give them. On Android you would have an apk file and on iOS you would have an ipa file. Now with flutter, you can build a release version of the app as either a mac .app file or a windows .exe file. These files run on their own and don’t require flutter or any other development environment. They are fast and can be distributed. Now to actually distribute the files you will need to work with the Apple store for the mac version and the windows store for the windows version. You can go to https://flutter.dev/desktop to read more about distribution.

Terminal

To build a release build for the Mac, go to the terminal app and go to your project directory. Now type:

flutter build macos

If you go to /build/macos/Build/Products/Release you will see your Todo.app file with the icon we created in the previous episode. Go ahead and double click on the app to start it and make sure it works correctly.

PowerShell

On Windows we need to do something similar. Open up PowerShell or CMD. Go to the project directory and type:

flutter build windows

Go to build -> windows -> runner -> release. You will see Todo.exe with the icon we created earlier. Double click to run the app and make sure it works correctly.

To create a Windows installer, you can use the msix plugin. Add the plugin by typing:

flutter pub add --dev msix

Android Studio

Inside of pubspec.yaml add the following configuration:

msix_config:
  display_name: Todo
  publisher_display_name: Your Company Name
  identity_name: com.kodeco.todo
  msix_version: 1.0.0.0
  capabilities: internetClient

There are many more parameters you can use from signing, to publishing. Now from the terminal type:

flutter pub run msix:create

Congratulations. You’ve now built Flutter desktop apps for both the Mac and windows platforms!