Beginner’s Guide to Flutter : Introduction and Setup.

Sukanya Manoharan
5 min readJun 17, 2020

In this article I’m going to tell you everything that you need to know about setting up the flutter.

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.

Flutter environment setup:

Let it be Linux, Mac or Windows, you can work with flutter from the OS of your choice.

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

  • 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

Do some experiments, make and break things, try to solve errors that you face with your experiment and have a lots of fun. After spending 2–3 hours experimenting with project, you will already start feeling comfortable with both Dart and Flutter.

Well there is one thing that amazed me about Flutter and that is it’s Hot Reload feature. You just need to run your full app once in the beginning and after that you can press Ctrl + S or Ctrl + \ and see the changes on your running app in the wink of an eye. This reduces a lot of time for development and makes your day far more productive as a developer.

Well if you have reached so far, it seems your environment is working well for you. Well congrats then, now you can go hands on and start learning the framework.

Follow along, we are going to talk about different aspects of Flutter in my upcoming posts. Please give love to the post if it helped you in getting started with flutter. Follow me for upcoming flutter articles.

--

--

Sukanya Manoharan

An Undergraduate Student | Always passionate about learning new technologies