Better Programming

Advice for programmers.

Getting Started With Flutter: An Installation Guide

Ashok
Better Programming
Published in
3 min readJan 30, 2020

--

Flutter is a mobile SDK meant for designing high-performance and high-fidelity mobile apps for iOS and Android using a single codebase.

Technically, Flutter is an open-source UI software development kit created by Google. It’s used to develop applications for Android, iOS, the web, etc. Flutter apps can be written in the Dart programming language.

Dart is a client-optimized language for fast apps on any platform. It‘s optimized for UI, fast on all platforms, and includes productive development.

Dart shares features with many other languages, like Kotlin and Swift. It can be easily transpiled into JavaScript code. As Flutter allows for a reactive and declarative style of programming, it resembles React Native. There is no need to use a bridge in Flutter to improve overall performance and startup time.

By using Dart, it will automatically achieve Ahead-of-Time compilation (AOT).

Getting Started

First, download Flutter SDK and set the path on .zprofile.

Here we go. Just follow the commands in terminal.

In my case, I have installed Xcode, Android Studio, and Visual Studio Code.

So when you hit ‘enter’ after typing “flutter doctor,” it shows you:

If you have not installed Xcode, Android Studio, and Visual Studio Code, follow these steps.

Step 1

Install Xcode from the App Store. That’s it.

Step 2

Download Android Studio and install the Flutter and Dart plugins.

To install these:

  1. Start Android Studio.
  2. Open plugin preferences (Preferences > Plugins on macOS, File > Settings > Plugins on Windows and Linux).
  3. Select Marketplace, select the Flutter and Dart plugins, and click Install.
  4. Click Yes when prompted to install the Dart plugin and restart.

Then, you have to configure the paths for Android Studio and Android SDK. Open terminal:

flutter config --android-studio-dir /Applications/Android\Studio.app
flutter config --android-sdk ~/Library/Android/sdk

All done for Android.

Step 3

Install Visual Studio Code and install the Flutter and Dart plugins.

  1. Start VS Code and Invoke View > Command Palette.
  2. Type “install” and select Extensions: Install Extensions.
  3. Type “flutter” in the extensions search field, select Flutter from the list, and click Install. This also installs the required Dart plugin.

All set. Now go to terminal and type “flutter doctor.”

For connected devices, you have to connect a physical device (iOS/Android) through a USB cable and enable developer options in Android. Or you can use an emulator or simulator.

Let’s discuss basic Flutter commands in an upcoming piece. Cheers!

--

--

Ashok
Ashok

Written by Ashok

 iOS and Flutter developer @TCS, Chennai. Here to share best practices learned through my experience. Reach me on www.linkedin.com/in/ashok1208