Step by Step guide to setting up Flutter in Windows along with Visual Studio Code with important extensions
Step by Step guide to setting up Flutter in Windows along with Visual Studio Code with important extensions

Setting up Flutter is not a difficult task but a bit lengthy procedure that requires us to perform a couple of steps to be performed correctly before we can run our first application.

Before starting the procedure of setting up just take a look at the system requirements

System Requirements

Following are the minimum requirements to do Development in Flutter

  • Operating Systems: Windows 7 SP1 or later (64-bit), x86-64 based.
  • Disk Space: 1.64 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 2.x, with the Use Git from the Windows Command Prompt option. If Git for Windows is already installed, make sure you can run git commands from the command prompt or PowerShell.

Additionally, you should have a minimum of 4GB of RAM to work otherwise I don't think it will be sufficient for this heavy task.

Getting Flutter SDK

To get Flutter SDK (stands for Standard Development Kit) type the following command in your command prompt or PowerShell
    git clone https://github.com/flutter/flutter.git -b stable

Update Path variable

Open your Windows search bar in the bottom left corner (or press the Windows + S key).
  • Search Environment variables and under Environment variables update Path variable
  • Now in the Path variable append the full path to flutter\bin using ; as a separator from existing values.

Install Android Studio

  • To get Android SDK you have to install Android Studio If you're using an old or a low spec device don't worry it won't be used for heavier work it is just to fulfill the requirement for Flutter.

Run Flutter Doctor

Now in command prompt or PowerShell run command
    flutter doctor
 You'll see everything installed except Android Licenses. To do so its simple you just have to enter command
    flutter doctor --android-licenses
Now accept all the licenses and run Flutter you'll see everything marked with a tick sign.

Installing Visual Studio Code

Now we have everything for Flutter set up and you can skip this part if you want to use Android Studio as your text editor but I personally prefer Visual Studio Code as it is lighter and I also like its interface. To install Visual Studio code you have to perform the following steps:
  • Download Visual Studio Code's latest version from their official website. [Here]
  • Once downloaded install it and now install some important extensions that are necessary for Visual Studio Code to work with Flutter
    • Invoke View>Command Palette or use short cut Ctrl + Shift + P
    • Type “install”, and select Extensions: Install Extensions.
    • Now search Flutter and click install. It will automatically install a required extension Dart.
  • You can install a couple more extensions for code snippets and better coding experience the one's that really help me are:
    • Awesome Flutter Snippets - Gives templates for different classes and short words for longer codes.
    • Bracket Pair Colorizer 2 - Pair of Bracket is set with the same color helping in finding missing or extra bracket,
    • Error Lens - Shows error on the same line of code where error or mistake is.
    • Flutter widget wrap - Helps in wrapping a widget inside of another one.
    • Flutter-stylizer - Formats the code in the best way possible to be readable for the programmer.
  • Now you should validate your  VS code set up to do so, open the command palette.
  • Type “doctor”, and select the Flutter: Run Flutter Doctor.
  • Review the output in the OUTPUT pane for any issues. Make sure to select Flutter from the dropdown in the different Output options.

Now set up your Android device for application testing

You can use Emulator from Android Studio for testing apps however that really slows down the system so using your phone is a better option. So, to do this you just have to follow these steps:
  • Open phone settings
  • Find Developer Options. If you don't see them click 7 times on the device build number from the about phone section.
  • Now inside developer options enable USB Debugging Mode
  • Plugin your phone using a USB cable and now run your app to test.
Hurrah! you've completed step 1 towards starting development in Flutter.

Do follow us for more information on our social platforms and leave suggestions in the comments.

If you liked this post head over to this post that will help you find the best resources to learn Flutter.