DEV Community

tkpranav for Innovation Incubator

Posted on • Originally published at Medium on

Flutter — Installation (Windows/MacOS)

Flutter — Installation (Windows/MacOS)

Flutter is Google’s UI toolkit for building beautiful, natively compiled applications for mobile, web, and desktop from a single code base.

This section is a step by step guide for installing Flutter on your local computer.

Installation in Windows:

Step 1 − Go to URL,https://flutter.dev/docs/get-started/install/windows and download the latest Flutter SDK. The file is flutter_windows_1.17.0-stable.zip.

Step 2 − Unzip the zip archive in a folder, say C:\src\flutter\

Step 3 −Now update the system path to include flutter bin directory.

Now to access flutter from any terminal, set the SDK path in environmental variables(type “env” in start menu, go to edit environmental variable. Once the env tab is open select path and click edit. Now add your SDK location: here it would be C:/src/flutter/bin).

So now open your windows terminal and type “ flutter --version”. This would display your flutter version and details, if not verify the env path you have provided.

Step 4 − Flutter provides a tool, flutter doctor to check whether all the requirement of flutter development is met.

Type “flutter doctor” on your prompt and it will display the list of completed installations and the pending or error ones.

The report says that all development tools are available but the device is not connected. We can fix this by connecting an android device through USB or starting an android emulator.

Step 6 − Install the latest Android SDK, if reported by flutter doctor.

Step 7 − Install the latest Android Studio, if reported by flutter doctor.

Step 8 − Start an android emulator or connect a real android device to the system.

Step 9 − Install Flutter and Dart plugin for Android Studio. It provides startup template to create new Flutter application, an option to run and debug Flutter application in the Android studio itself, etc.,

  • Open Android Studio.
  • Click File → Settings → Plugins.
  • Search for Flutter plugin and click Install.
  • Click Yes when prompted to install the Dart plugin.
  • Restart Android studio.

Installation in MacOS :

To install Flutter on MacOS, follow the following steps :

Step 1 − Go to the URL,https://flutter.dev/docs/get-started/install/macos and download latest Flutter SDK. The file is flutter_macos_1.17.0- stable.zip.

Step 2 − Unzip the zip archive in a folder, say /path/to/flutter

$ cd ~/development
$ unzip ~/Downloads/flutter\_macos\_1.17.0-stable.zip

If you don’t want to install a fixed version of the installation bundle, you can skip steps 1 and 2. Instead, get the source code from the Flutter repo on GitHub, and change branches or tags as needed. For example:

$ git clone [https://github.com/flutter/flutter.git](https://github.com/flutter/flutter.git) -b stable

Step 3 − Update the system path to include flutter bin directory (in ~/.bashrc file).

$ export PATH="$PATH:`pwd`/flutter/bin"

Step 4 − Enable the updated path in the current session using below command and then verify it as well.

source ~/.bashrc
source $HOME/.bash\_profile
echo $PATH

Flutter provides a tool, flutter doctor to check whether all the requirement of flutter development is met.

Run flutter doctor

Run the following command to see if there are any dependencies you need to install to complete the setup (for verbose output, add the -v flag):

$ flutter doctor

This command checks your environment and displays a report to the terminal window. The Dart SDK is bundled with Flutter; it is not necessary to install Dart separately. Check the output carefully for other software you might need to install or further tasks to perform (shown in bold text).For example:

Step 5 − Install latest XCode, if reported by flutter doctor.

Step 6 − Install latest Android SDK, if reported by flutter doctor.

Step 7 − Install latest Android Studio, if reported by flutter doctor.

Step 8 − Start an android emulator or connect a real android device to the system to develop android application.

Step 9 − Open iOS simulator or connect a real iPhone device to the system to develop iOS application.

Step 10 − Install Flutter and Dart plugin for Android Studio. It provides the startup template to create a new Flutter application, option to run and debug Flutter application in the Android studio itself, etc.,

  • Open Android Studio
  • Click Preferences → Plugins
  • Select the Flutter plugin and click Install
  • Click Yes when prompted to install the Dart plugin.
  • Restart Android studio.

Top comments (0)