Flutter is the google’s mobile app SDK for develop the high-quality native app for iOS and android. We can develop the app by use of DART and javascript language support or we can run theses. Flutter’s hot reload helps you quickly and easily experiment, build UIs, add features, and fix bugs faster. Experience sub-second reload times, without losing state, on emulators, simulators, and hardware for iOS and Android.

Steps for setup the flutter

1. Download the flutter SDK or Cloning the flutter SDK

2. Add the flutter tools path globally

3. Run flutter doctor

4. Configure Editor for Flutter support

5. Setup the iOS/Android tools for development

6. Create the new Flutter Project

Step 1 : Download the flutter SDK or Cloning the flutter SDK

We can download the flutter alpha SDK version from Flutter official website or clone the SDK from Flutter Official Github Repository according to your OS.

Download the SDK from Flutter official website.





Cloning the flutter SDK : – You can clone the alpha branch from flutter official Repository. Before clone the repository set the terminal path where you want to clone.

Select the branch and copy the clone HTTPS link

git clone https://github.com/flutter/flutter.git

OR

We can directly clone the alpha branch (Branch Select according to you [dev, alpha, beta, hackathon])

git clone https://github.com/flutter/flutter.git -b alpha // git clone ($Repository URL) -b ($Branch name)

NOTE : – SDK’s are not available for master branch if you need the master branch you can directly clone them from GitHub (as specified by -b master), and then trigger a download of the SDK dependencies.

git clone -b master https://github.com/flutter/flutter.git ./flutter/bin/flutter --version

Step 2 : Add the flutter tools path globaly

You can set the PATH variable for the flutter according to you but we need to set the PATH variable globaly.

First find your flutter folder $PATH by use of pwd command and now run the below command.

export PATH=`pwd`/flutter/bin:$PATH //export PATH=/Users/amangupta/Documents/flutter/bin:$PATH (Example)











Step 3 : Run flutter doctor

Now you can run the flutter doctor command in terminal for check the dependencies you need to install to complete the setup.

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 may need to install or further tasks to perform (shown in bold text).

Step 4 : Configure Editor for Flutter support

Now we need to Download the flutter editor. Flutter is supported in different Editor but we use here Visual studio (Atom, Eclipse etc)

Download the visual studio.

Install the Flutter plugin

Invoke View -> Command Palette…

Type ‘install’, and select the ‘Extensions: Install Extension’ action

Enter flutter in the search field, select ‘Flutter’ in the list, and click Install

Select ‘OK’ to reload VS Code

Validate your setup with the Flutter Doctor

Invoke View -> Command Palette…

Type ‘doctor’, and select the ‘Flutter: Run Flutter Doctor’ action

Review the output in the ‘OUTPUT’ pane for any issuesAttach the flutter SDK by visual studio.





Step 5 : Setup the iOS/Android tools for development

To develop Flutter apps for iOS, you need a Mac with Xcode 9.0 or newer.

You can install the XCode from apple website.

and for Android app we need Android studio, ersion 3.0 or later.

Now run the below command in command prome

open -a Simulator

Install homebrew.

Open the terminal and run these commands to install the tools for deploying Flutter apps to iOS devices.

brew update brew install --HEAD libimobiledevice brew install ideviceinstaller ios-deploy cocoapods pod setup

Step 6: Create the new Flutter Project