Flutter is Google’s launched framework that uses a single codebase system to build fast, productive, and beautiful apps. Although there are other development frameworks available, Flutter has its own significance in the software industry. It has several benefits over other platforms which makes it stand out in the market. As you know, the mobile app trends are evolving day by day, it’s becoming more challenging to build apps of the future. Similarly, development frameworks are advancing to cope with the newer and more complex challenges in mobile, web, and desktop app development. Moving on further, we will be discussing how to install flutter on different development platforms like windows, macOS, Linux, and chrome.
It has never been so difficult to install flutter on any operating system. Having such beneficial and useful features to build apps, flutter has an easy installation process as well. You need to make sure that your system must meet the minimum requirements to install flutter.
Let’s start with the basic steps to install flutter on windows, macOS, Linux, and Chrome OS.
How to Install Flutter on Windows?
To install flutter on windows, your system should first meet the minimum requirements. According to Flutter, the system requirements to install flutter and run it on windows are:
- Windows 7 SP1 or later (64-bit), x86-64 based.
- 1.64 GB of storage space.
- Tools like Windows PowerShell 5.0 or latest, Git for Windows 2.x (with the “use Git from Windows Command Prompt option”).
Get the Flutter SDK
You need to download the following installation bundle to get the latest stable release of the Flutter SDK. Download it now.
You can visit the flutter SDK releases page for the latest releases and older builds.
After downloading this zip file, extract the contained flutter SDK in your desired location. We recommend creating a new folder and extracting the SDK in that folder e.g C:\src\flutter). Flutter doesn’t recommend installing flutter in a directory like C:\Program Files\ that requires high privileges.
Update the Path
If you prefer running Flutter commands in the regular Windows console, you can add Flutter to the PATH environment variable. Just follow these steps:
Enter ‘env’ from the window’s search bar and select Edit environment variables for your account.
Check if there is an entry called ‘Path’ under user variables.
If the entry exists, add the full path to flutter\bin using the symbol “;” as a separator from existing values. And if the entry doesn’t exist, create a new user variable. Name this variable as “Path” with the full path to flutter\bin as its value.
You have to close and launch any existing console windows again for these changes to take effect.
Run Flutter Doctor
Flutter doctor checks your environment and installation status to show if there are any platform dependencies you need to complete the setup. Run the following command and check the output carefully for any remaining task you may need to complete (report shows in the bold text).
Once you have finished every task, you can run flutter doctor command again to verify everything has been done correctly.
For android setup, you need to install android studio.
Install Android Studio
Follow these steps to install Android Studio.
- Download and install android studio from its official website.
- Run Android Studio and check the ‘Android Studio Setup Wizard’. This installs the latest Android SDK, Android SDK Command-line Tools, and Android SDK Build-Tools which Flutter requires during android development.
- Now run flutter doctor to confirm whether Flutter has located your installation of Android Studio or not. If it didn’t, run flutter config –android-studio-dir <directory> to set the directory that Android Studio is installed to.
Set Up your Android Device
You need an Android device running Android 4.1 (API level 16) or higher to run and test your Flutter app on an Android device.
- Enable Developer options and USB debugging on your device. The detailed instructions are available in the Android documentation.
- Windows-only: Install the Google USB Driver.
- Using a USB cable, plug your phone into your computer. If prompted on your device, authorize your computer to access your device.
- In the terminal, run the flutter devices command to verify that Flutter recognizes your connected Android device. By default, Flutter uses the Android SDK version where your adb tool is based. If you want Flutter to use a different Android SDK installation, you must set the ANDROID_SDK_ROOT environment variable to that installation directory.
Install Flutter on macOS
Installing flutter on macOS has never been so difficult. Flutter lays a simple and easy way to start development and build your first app and so on. To install flutter on macOS, your system must meet the following requirements:
- Mac operating system.
- 2.8 GB of storage space.
- Xcode for iOS and macOS development. Xcode has git already, but you can also install it separately.
Get the Flutter SDK for macOS
- First of all, download the latest installation bundles to get the stable release of Flutter SDK. Download now.
You can access other release channels and older builds of Flutter SDK for macOS from here.
- After downloading the zip file, extract it to your desired location.
- Then add the flutter tool to your path using the following command.
Finishing Installation Process
After setting up the path, run the flutter doctor command ($ flutter doctor) so that you can identify if anything is left to finish the setup.
[-] Android toolchain – develop for Android devices
• Android SDK at /Users/obiwan/Library/Android/sdk
✗ Android SDK is missing command-line tools; download from https://developer.android.com/studio/index.html#downloads
• Try re-installing or updating your Android SDK,
Visit https://docs.flutter.dev/setup/#android-setup for detailed instructions.
The report mentions every missing dependency and gives you the solution. Install the missing dependencies and run the flutter doctor again to check if everything has been done perfectly. After all, you have to set up the platform. This includes iOS setup, Android setup, mac setup, and web set up. Head over to Flutter’s brief documentation about how to set up all platforms for macOS.
Install Flutter on Linux
To install flutter on Linux, your development environment must meet the following requirements:
- Linux (64-bit) operating system.
- 600 MB of storage space (excluding the disk space for IDE/tools).
- Flutter requires the following command-line tools for being available on Linux.
bash, curl, file, git 2.x, mkdir, rm, unzip, which, xz-utils, zip. Flutter also depends on shared libraries (libGLU.so.1) to be available on Linux.
Get the Flutter SDK for Linux
You can install flutter on Linux in two ways.
Install Flutter Using Snapd
To use snapd is the easiest way to install flutter on Linux. Install snapd from here. After installing snapd, you can install Flutter using Snap Store. You can also install flutter at the command line: $ sudo snap install flutter –classic.
Install Flutter Manually
If you don’t want to use snapd for flutter installation, you can also install flutter manually. Just follow these steps to install flutter on Linux OS.
- Download the installation bundle to get the latest stable release of the Flutter SDK.
- Extract the file into your desired location.
If you don’t want to install a fixed version, get the source code from the Flutter repo on GitHub. Run the following command:
$ git clone https://github.com/flutter/flutter.git
- Now, add the flutter tool to your path. Run the command
$ export PATH="$PATH:`pwd`/flutter/bin"
Pre-download the development binaries and run the following command:
$ flutter precache
Finally, you are now ready to run Flutter commands.
After doing all the steps mentioned above, run the flutter doctor command. This checks if there are any dependencies you need to complete the setup. Run the command $ flutter doctor (for verbose output, add the –v flag) to verify every installation dependencies.
Install Flutter on Chrome OS
As for all other OS, your development environment must meet the minimum requirements. For Chrome OS, these are:
- Chrome OS (64-bit) with Linux (Beta) turned on.
- 600MB storage space (excluding disk space for IDE/tools).
- Flutter relies on the following command-line tools for being able to be available in your development environment. These are bash, curl, git 2.x, mkdir, rm, unzip, which, xz-utils.
- Flutter test command depends on shared libraries to be able for being available in your environment.
The library is libGLU.so.1 which is provided by mesa packages such as
libglu1-mesa on Ubuntu/Debian.
Get the Flutter SDK
- Download the installation bundle for the stable release of the Flutter SDK.
- Drag & drop the downloaded file from “downloads” to “Linux Files”. This will give access to Flutter from your Linux container.
- Similarly, extract the file in your desired location.
The rest of the installation steps are the same as for the flutter installation on Linux OS.
After installing flutter successfully, you need to setup an editor for your development platform. Flutter recommends one of their editor plugins for a better development experience. Interestingly, these plugins provide code completion, syntax highlighting, widget editing assists, run & debug support, and more. Follow Flutter’s complete documentation to set up an editor for your platform.
We hope you will find this guide useful for installing flutter on your operating system. Feel free to ask any questions or give suggestions if you want to. Just comment down below and our team member will get back to you for help.