How To Setup Flutter and Write Code

Pushpendra Kumar
4 min readNov 20, 2023

--

What is flutter?

Flutter is an open-source UI (SDK) Software Development Kit created by Google.

Flutter is an open-source UI software development kit (SDK) created by Google. It is used to build cross-platform Android, IOS, Linux, Mac, and Windows applications from a single codebase. Flutter allows developers to write code once and deploy it on multiple platforms, saving time and effort.

Flutter uses Dart Programming language.

Flutter uses Hybrid Approaches.

  • Material Design Widgets for Android Devices.
  • Cupertino Widgets for IOS.
  • There are lots of libraries to run Android and IOS to run.
  • IOS consists of Kernel and device drivers, and Android consists of Linux Kernal on device drivers.

System requirements?

  • Operating Systems: Windows 10 or later (64-bit), x86–64 based.
  • Disk Space: 2.5 GB (does not include disk space for IDE/tools).
  • Tools: Flutter depends on these tools being available in your environment.
  • Windows PowerShell 5.0 or newer (this is pre-installed with Windows 10)
  • Git for Windows with the Use Git from the Windows Command Prompt option.

If Git for Windows is installed, ensure you can run git commands from the command prompt or PowerShell.

1. Install the Flutter SDK

  1. Download Flutter SDK from — Flutter. dev
  2. Extract the downloaded SDK to the C:\sdk\ location.
  3. Update the Path
  • From the Start search bar, enter ‘env’ and select Edit environment variables for your account.
  • Open Environment Variables.
  • Select Path and click on Edit.
  • You need to paste the path you gave while extracting the SDK, don’t forget to add flutter\bin after the path.

Flutter is now ready. To check the installed version of flutter, just type flutter --version at the command prompt.

flutter --version

Hopefully, you see something similar to this —

(if you don’t, try retracing the above steps and be extra careful with the Path variable and .zip file extraction).

2. Install a Code Editor

Here we have two code editors to start programming in flutter.

1. Android Studio

2. Vs code

Both IDEs are similar in the majority of aspects, But the Android studio is more compatible with Flutter Development, because of their compatibility with AndroidX, Jetpack, etc.

Firstly we are going to run our with the help of Android Studio then we’ll do it with vs code.

Install Android Studio

  1. Download Android Studio.

2. Install Android Studio.

3. Flutter and Dart must be installed after installing Android Studio. See the gif ️👇 for instructions️.

In order to build an application with Flutter, we need to run the command flutter doctor in “command prompt” in order to find out what’s missing.

flutter doctor

We have done these things, but some are still pending to build a Flutter application.

As we see in the terminal we have some applications and services missing to Start.

Android toolchain Android license and Android SDK Command-line Tools To install it, we have to install Android SDK Command-line Tools in settings → Languages & Frameworks → Android SDK → SDK Tools → Android SDK Command-line Tools (latest) Click and press on ok to install it.
To install this tool follow the gif below:

Now let's check what next thing is pending by ( flutter doctor ) command.

Accept Android licenses by copying and pasting the command shown in the terminal or typing in the terminal.

yes to accept and check again flutter doctor.

Now next step is to install Visual Studio and “Desktop Development with C++”. To Install Visual Studio Download it from (Visual studio) link. and follow the given gif to install it and “Desktop Development with C++”.

Check again with flutter doctor command.

installation process is done now you can create your project 😉.

--

--