Flutter Installation

Flutter Installation

In this section, we will learn how to set up an environment for the successful development of the Flutter application.

Install Flutter SDK

Step1: First download Flutter SDK for Windows, macOS, Linux, it’s available on the official website (https://flutter.dev) Next after clicking on the get started button, you will get the following screen. Based on the operating system, you need to select the appropriate SDK. I have installed Windows OS on my machine, so I am going with Windows SDK.

Step2: Next, to download the latest Flutter SDK, click on the Windows icon. Once you click on the Windows icon, you will be redirected to (https://docs.flutter.dev/get-started/install/windows) the following page. Just click on the flutter_windiws_2.10.3-stable.zip as shown in the below image.

System requirements

To install and run Flutter, your development environment must meet these minimum requirements:

  1. Operating Systems: Windows 7 SP1 or later (64-bit), x86-64 based.
  2. Disk Space: 1.64 GB (does not include disk space for IDE/tools).
  3. Tools: Flutter depends on these tools being available in your environment.
    Windows PowerShell 5.0 or newer (this is pre-installed with Windows 10)
    Git for Windows 2.x, with the Use Git from the Windows Command Prompt option.

If Git for Windows is already installed, make sure you can run git commands from the command prompt or PowerShell.

Step3: once downloading is completed, extract the zip file and place it within the desired installation folder or location, for instance, D: /flutter.

Step4: To run the Flutter command in the windows console, you wish to update the system path to incorporate the flutter bin directory. the below steps are required to try to do this:

i) move to MyComputer properties -> advanced tab -> environment variables. you will get the below screen.

blank

ii) Next, select path -> press on edit. the below screen will appear.

blank

iii) within the above window, click on New->write path of Flutter bin folder in variable value -> then click on ok.

iv) Next, run the command $ flutter doctor. This command will check for all the necessary things required for Flutter app development and displays a report of the status of your Flutter installation.

$ flutter doctor

Step: once you run the above command, it’ll analyze the system and i report, as shown within the below image. Here, you’ll find the small print of all missing tools, which are required to run Flutter.

blank

Step6: Install the Android SDK. If the flutter doctor command doesn’t find the Android SDK tool in your system, then you wish first to put in the Android Studio IDE. to put in Android Studio IDE, do the below steps.

i) Download the most recent Android Studio executable or zip file from the official site. (https://developer.android.com/studio)

ii) When the download is complete, open the .exe file and run it. you will get the below screen

blank

iii) completing the above steps of the installation wizard. Once the installation wizard completes, you may get the below screen.

blank

iv) within the above screen, click Next-> Finish. Once the Finish button is clicked, you need to choose the ‘Don’t import Settings option’ and click on OK. it’ll start the android Studio.

blank

Step 8: Next, you need to required set up an Android emulator. it’s responsible for running and testing the Flutter application.

i) To set up an Android emulator, move on Android Studio > Tools > Android > AVD Manager and choose to Create Virtual Device. Or, visit Help->Find Action->Type Emulator within the search box. you will get the below screen.

blank

ii) Choose your device definition and click on Next.

iii) Select the system image for the most recent Android version and click on Next.

iv) Now, verify all AVD configurations. If it’s correct, click on Finish. the next will screen appears.

blank

v) Next, click on the red color rectangle icon. The Android emulator is displayed as below screen.

blank

Step8: Next, you need to install Flutter and Dart plugin for creating a Flutter application in Android Studio. These plugins provide a template to make a Flutter application, give a choice to run and debug the Flutter application within the Android Studio itself. Do the below steps to install these plugins.

i) Open the Android Studio so move to File->Settings->Plugins.

ii) Now, search the Flutter plugin. If found, select Flutter plugin and click on install. After that you need to click on install, it’ll ask to install Dart plugin as below screen. Click yes to proceed.

blank

iii) Restart the Android Studio.

Get Flutter SDK for macOS

Step1: Download the Flutter SDK for macOS. To download it, follow its official website.(https://docs.flutter.dev/get-started/install/macos)

Step2: When your download is complete, extract the zip file and place it within the desired installation folder or location.

Step3: To run the Flutter command, you would like to update the system path to incorporate the flutter bin directory.

$ export PATH=”$PATH:’pw’/flutter/bin”

Step4: Next, enable the updated path within the current terminal window using the below command then verify it also.

i) source ~/.bashrc

ii) source $HOME/.bash_profile

ii) echo $PATH

Step5: Next, run the $ flutter doctor command. This command checks for all the required things for Flutter app development and displays a report of the status of your Flutter installation.

$ flutter doctor

Step6: After you run the above command, it’ll analyze the system and also the details of all missing tools, which required to run Flutter

Step7: Install the newest Xcode tools if reported by the Flutter doctor tool.using AppStore Application

Step8: Install the latest Android Studio and SDK, if it is reported by the Flutter doctor tool.

Step9: Next, you need to set up an iOS simulator or connect an iPhone device to the system for developing an iOS application.

Step10: Again, to set up an android emulator or connect an android device to the system for developing an android application.

Step11: Next, you need to install the Flutter and Dart plugin for building Flutter applications in Android Studio. These plugins provide a template for a Flutter application, give a choice to run and debug Flutter application within the Android Studio itself

2 thoughts on “Flutter Installation”

Leave a Reply

Your email address will not be published. Required fields are marked *