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

02. Installing Flutter

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: 01. Learn About Flutter Desktop Next episode: 03. Create a Flutter Desktop App

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: 02. Installing Flutter

Flutter Desktop development works well but not all plugins support the desktop.

To make sure a plugin supports the desktop, go to pub.dev, search for flutter packages and check that both MacOs and Windows are shown in the platform section.

Here you can see that this plugin supports Linux, Macos and Windows and given a small bit of code to explain how to use it. To start developing Flutter desktop applications, you will need to install several programs for the Mac and Windows platforms.

Macos

The first application you should install on your mac is Xcode. You can get Xcode from the App Store. Once you have xcode installed, you will need to configure it. Open up the terminal app

Terminal

and type the following:

sudo Xcode-select —switch /Applications/Xcode.app/Contents/Developer

This will set the path for the active developer directory. Next, you need to install Cocopods. This dependency manager can be found at cocoapods.org. Since Cocopods is built with Ruby and ruby is already installed on a Mac, you can install it with the following command:

sudo gem install cocoapods

It will take some time to install.

For Windows, you will need to install the free community edition of Visual Studio 2022. Go to visualstudio.microsoft.com/downloads and download the community edition.

Install flutter

For both platforms, head to flutter.dev/docs/get-started/install and install Flutter. For the Macintosh you will need to download the zip file for Flutter, which includes the Dart language. I recommend you use a simple path like ~/flutter on Mac and C:\flutter on windows. Create the directory and then unzip the flutter zip package and move it to your new flutter directory.

Terminal

Next you need to add flutter to your path. On the Mac, add the path to your .bash_profile (Bash Shell) file or .zshrc (Z Shell) file. If you don’t have any of these files, create a new .bash_profile file in your home directory and add:

export PATH=$PATH:~/flutter/bin

On Windows, type ‘env’ in the search bar and select ‘Edit environment variables for your account’. Select the Environment variables button and then choose the ‘Path’ variable under user variables for your name and choose edit. Double-click on a new row and add the path C:\flutter\bin. Select OK until all of the windows are closed.

To make sure Flutter is installed correctly, run flutter doctor on both platforms. It will show a check box list of items that are good and bad.

Next, install either android studio

or Visual Studio Code to do your development work in.

Once you have installed and run the application, you will need to install the Flutter plugin. You can find the flutter plugin in Android Studio in the preferences -> plugins section. Install and restart. Visual Studio has a Flutter extension you can install.

Terminal

Once that is done, run flutter doctor from the command line to make sure everything looks good. You are now ready to start writing Flutter desktop apps!