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

03. Create a Flutter Desktop App

Episode complete

Play next episode

Next
About this episode
Leave a rating/review
See forum comments
Cinema mode Mark complete Download course materials
Previous episode: 02. Installing Flutter Next episode: 04. Setting & Limiting the Window Size

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.

Notes: 03. Create a Flutter Desktop App

You will need a Macintosh or Windows computer. You will need to install Flutter, and the latest version of Android Studio. We recommend watching our Your First Flutter App for information on how to create a flutter app.

Transcript: 03. Create a Flutter Desktop App

Creating a project from the IDE or command line

You can create a project from either Android Studio or the command line. You can also use this method when you have an existing project. If you type:

Create project form Command line

flutter create --platforms=windows,macos .

inside of an existing project, this command creates new sub directories for Windows and Mac. If you want to only develop desktop apps, then you will need to delete the iOS and Android directories.

Command Line

To create both platforms at once without iOS and Android, you can create the project from the command line.

flutter create --platforms=windows,macos todo

This will create the whole project structure with just the windows and macos folders.

Android Studio

Open up Android Studio. Now choose New -> New flutter project. Make sure your Flutter SDK path is correct. Click next. Enter in the name Todo for the Project. Select a project location and give a better description of the project. Keep the type as an application and enter your organization. We’ll use com.kodeco. Un-check Android and iOS if this is just a desktop application. Click Finish.

Notice that in the project tab you have the usual Flutter lib directory along with the windows and macos directories. Opening up the macos folder, you will see a Flutter, Pods, and Runner folders. The other two folders are the XCode project files. There is also a Podfile, which is used by CocoaPods, an application level dependency manager for the Mac and iOS.

The windows folder also has flutter and runner folders. The runner folder has C++ files to help run Flutter on Windows. We will be using this on a Windows machine.

Congratulations, you now know how to create a desktop project for developing Macintosh and Windows Flutter apps.