Flutter Installation & Run Sample app on ios and android.

Flutter installation is as simple as setting a path to your machine environmental variables.

Download flutter SDK

Download latest flutter SDK from https://flutter.io/get-started/install/

Configure flutter

set flutter SDK path (path_to_flutter_sdk_folder/bin) global environment variables. So you can access flutter tool from anywhere in your machine.

IDE’s

IDE’s for flutter development — VS Code or Android Studio (I prefer as an Android developer),

Download Android SDK

Android SDK needs to be download in your machine. You can download Android SDK from https://developer.android.com/studio/

Android Studio bundled with SDK. so need to download separately, If you have chosen your IDE as Android SDK.

If you are developing an application for ios, You need to use the Mac operating system and XCode to be installed.

Validate Flutter Installation

To check flutter installation, run the following command.

yourMachine:~ user$ flutter doctor

yourMachine:~ user$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, v0.9.4, on Mac OS X 10.13.6 17G65, locale en-IN)
[✓] Android toolchain - develop for Android devices (Android SDK 28.0.3)
[✓] iOS toolchain - develop for iOS devices (Xcode 10.0)
[✓] Android Studio (version 3.2)
[✓] Connected devices (1 available)

The above summary tells about the basic requirements to run your flutter application for Android and iOS.

Accept Android SDK Licences

Need to accept android licenses for some tools, to accept run below command yourMachine:~ user$ flutter doctor — android-licenses

Install Dart and Flutter Android Studio plugins

Run Android Studio and Install Dart and Flutter plugins and Restart Android Studio to reflect plugins

Installing Flutter and Dart plugins from Plugins section.

Create Flutter project in Android Studio

Click on Start a new Flutter project

Click and follow the below steps to create your first Flutter application.

  • Select “Flutter Application”
  • Provide Project Name, Flutter SDK path, Project location, and Description
  • Provide your app package and Finish.

Ready to Go… A sample Flutter application launched with enough documentation (Comments).

Note: You need to create Android Emulator or iOS Simulator, both.

Android studio will identify created Emulator (in Windows), both (in Mac machine)

Run the Sample App

The Origin for the flutter application is main.dart. We have to run main.dart file to run the application in respective platform.

Demo App

This is just demo application created by Android studio, Next post will create an application from scratch.

Thanks, See you in the next post.