How to install flutter | Flutter tutorial

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.

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

    Select the branch and copy the clone HTTPS linkClone Flutter RepositoryFlutter alpha branch


1
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])


1
2
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.


1
2
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 

1
pwd

 command and now run the below command.


1
2
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).

Flutter Doctor terminal output

 

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.
    Locate the Flutter SDK folder
    Attach the Flutter SDK with vistual 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


1
open -a Simulator
  • Install homebrew.
  • Open the terminal and run these commands to install the tools for deploying Flutter apps to iOS devices.

1
2
3
4
brew update
brew install --HEAD libimobiledevice
brew install ideviceinstaller ios-deploy cocoapods
pod setup

Step 6: Create the new Flutter Project

  • Invoke View -> Command Palette…
  • Type ‘flutter’, and select the ‘Flutter: New Project’ action
  • Enter a project name (e.g. myapp), and press Enter
  • Specify a location to place the project, and press the blue OK button
  • Wait for the project creation to continue, and the main.dart file to appear

Related Post

Create UITableView (Table View) By the use of stor... How to use UITableView in Above IOS 8 and Swift (UITableView) In this tutorial we are study how to use the TableView in Swift. One of the most common...
Loop Control Statement Loop control statements are used when a section of code may either be executed a fixed number of times. C gives you a choice of three types of loop st...
Asset Color Catalog | Swift Tutorial Asset Color Catalog is the feature of XCode 9. BY the use of this feature we can maintain the colors easily and avoid the mistakes. We can create the ...
Create Firebase single Page Website Create firebase single page Website tutorial In this tutorial we are study how to create single page website by the use of firebase hosting its very ...
Comments in C Comments in C Comments in C language are used to provide information about lines of code. It is widely used for documenting code. There are 2 types o...
Navigation Tab Bar in IOS | Swift tutorial Navigation Tab Bar in IOS | Swift tutorial Different Customizing techniques for Navigation bar with storyboard and code 1) Custom NavigationTabBar b...

Leave a Reply

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

Get more stuff like this
in your inbox

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.