Chandan Rajpurohit

An Artist With Technical Skills

Photo by MockupEditor.com on Pexels.com
Advertisements

What Is Flutter ?

Flutter is Google’s UI toolkit for building beautiful, natively compiled applications for mobile, web and desktop from a single codebase.

Why To Choose Flutter ?

  1. Fast Development
  2. Expressive and Flexible UI
  3. Native Performance

Who’s using Flutter?

  1. Google
  2. ebay
  3. BMW
  4. Alibaba Group etc…..
Advertisements

Installation of Flutter are divided into following steps:-

  1. Get the Flutter SDK
  2. Update path in environment variable
  3. Run flutter docter
Get the Flutter SDK
  1. Download the following installation bundle to get the latest stable release of the Flutter SDK:

flutter_windows_1.22.4-stable.zip

For other releases, and older builds, see the Flutter SDK releases – Flutter page.

Extract the zip file and place the contained flutter in the desired installation location for the Flutter SDK (for example, C:\src).

Warning: Do not install Flutter in a directory like C:\Program Files that requires elevated privileges.

If you don’t want to install a fixed version of the installation bundle, you can skip steps 1 and 2. Instead, get the source code from the GitHub – flutter/flutter: Flutter makes it easy and fast to build beautiful apps for mobile and beyond. on GitHub, and change branches or tags as needed. For example:

C:\src>git clone https://github.com/flutter/flutter.git -b stable

You are now ready to run Flutter commands in the Flutter Console.

Advertisements

Update path in environment variable

If you wish to run Flutter commands in the regular Windows console, take these steps to add Flutter to the PATH environment variable:

  • From the Start search bar, search Edit environment variables for your account.
  • Under User variables check if there is an entry called Path:
    • If the entry exists, append the full path to flutter\bin using ; as a separator from existing values.
    • If the entry doesn’t exist, create a new user variable named Path with the full path to flutter\bin as its value.

You have to close and reopen any existing console windows for these changes to take effect.

Note: As of Flutter’s 1.19.0 dev release, the Flutter SDK contains the dart command alongside the flutter command so that you can more easily run Dart command-line programs. Downloading the Flutter SDK also downloads the compatible version of Dart, but if you’ve downloaded the Dart SDK separately, make sure that the Flutter version of dart is first in your path, as the two versions might not be compatible. The following command (on macOS, linux, and chrome OS), tells you whether the flutter and dart commands originate from the same bin directory and are therefore compatible. (Some versions of Windows support a similar where command.)

  $ which flutter dart
  /path-to-flutter-sdk/bin/flutter
  /usr/local/bin/dart

As shown above, the two commands don’t come from the same bin directory. Update your path to use commands from /path-to-flutter-sdk/bin before commands from /usr/local/bin (in this case). After updating your shell for the change to take effect, running the which or where command again should show that the flutter and dart commands now come from the same directory.

  $ which flutter dart
  /path-to-flutter-sdk/bin/flutter
  /path-to-flutter-sdk/bin/dart

To learn more about the dart command, run dart -h from the command line.

Advertisements

Run flutter doctor

From a console window that has the Flutter directory in the path (see above), run the following command to see if there are any platform dependencies you need to complete the setup:content_copy

C:\src\flutter>flutter doctor

This command checks your environment and displays a report of the status of your Flutter installation. Check the output carefully for other software you might need to install or further tasks to perform (shown in bold text).

For example:

[-] Android toolchain - develop for Android devices
• Android SDK at D:\Android\sdk
✗ Android SDK is missing command line tools; download from https://goo.gl/XxQghQ
• Try re-installing or updating your Android SDK,
visit https://flutter.dev/setup/#android-setup for detailed instructions.

The above sections describe how to perform these tasks and finish the setup process. Once you have installed any missing dependencies, you can run the flutter doctor command again to verify that you’ve set everything up correctly.

In case of any error add them in comment section.

Keep Reading !!

Thank You.


One response to “Flutter Introduction & Installation”

Leave a Reply

%d bloggers like this: